replace __proto__ with Object.setPrototype

This commit is contained in:
Zeke Sikelianos 2016-03-28 17:51:11 -07:00 committed by Kevin Sawicki
parent 2c3cacdc08
commit 4e2f1311e0
10 changed files with 12 additions and 12 deletions

View file

@ -5,7 +5,7 @@ const deprecate = require('electron').deprecate
const EventEmitter = require('events').EventEmitter
const {BrowserWindow, _setDeprecatedOptionsCheck} = process.atomBinding('window')
BrowserWindow.prototype.__proto__ = EventEmitter.prototype
Object.setPrototypeOf(BrowserWindow.prototype, EventEmitter.prototype)
BrowserWindow.prototype._init = function () {
// avoid recursive require.