ObjectsRegistry no longer needs to send events
This commit is contained in:
parent
2b04af4349
commit
59d6e7d6ef
1 changed files with 1 additions and 7 deletions
|
@ -1,13 +1,9 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const EventEmitter = require('events').EventEmitter;
|
|
||||||
const v8Util = process.atomBinding('v8_util');
|
const v8Util = process.atomBinding('v8_util');
|
||||||
|
|
||||||
class ObjectsRegistry extends EventEmitter {
|
class ObjectsRegistry {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
|
||||||
|
|
||||||
this.setMaxListeners(Number.MAX_VALUE);
|
|
||||||
this.nextId = 0;
|
this.nextId = 0;
|
||||||
|
|
||||||
// Stores all objects by ref-counting.
|
// Stores all objects by ref-counting.
|
||||||
|
@ -53,8 +49,6 @@ class ObjectsRegistry extends EventEmitter {
|
||||||
|
|
||||||
// Clear all references to objects refrenced by the WebContents.
|
// Clear all references to objects refrenced by the WebContents.
|
||||||
clear(webContentsId) {
|
clear(webContentsId) {
|
||||||
this.emit(`clear-${webContentsId}`);
|
|
||||||
|
|
||||||
let owner = this.owners[webContentsId];
|
let owner = this.owners[webContentsId];
|
||||||
if (!owner)
|
if (!owner)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue