No need to call sender.callbacks.remove

The IDWeakMap automatically removes the key when object is garbage
collected.
This commit is contained in:
Cheng Zhao 2016-01-13 17:07:18 +08:00
parent 3875b30fcf
commit c10c419f1d
2 changed files with 26 additions and 21 deletions

View file

@ -70,6 +70,10 @@ let wrapWebContents = function(webContents) {
var controller, method, name, ref1;
webContents.__proto__ = EventEmitter.prototype;
// Every remote callback from renderer process would add a listenter to the
// render-view-deleted event, so ignore the listenters warning.
webContents.setMaxListeners(0);
// WebContents::send(channel, args..)
webContents.send = function() {
var args, channel;