diff --git a/lib/browser/api/browser-window.js b/lib/browser/api/browser-window.js index cb523496d65c..7b82e01eca11 100644 --- a/lib/browser/api/browser-window.js +++ b/lib/browser/api/browser-window.js @@ -48,6 +48,15 @@ BrowserWindow.prototype._init = function () { return } + if (webContents.getLastWebPreferences().nodeIntegration === true) { + const message = + 'Enabling Node.js integration in child windows opened with the ' + + '"nativeWindowOpen" option will cause memory leaks, please turn off ' + + 'the "nodeIntegration" option.\\n' + + 'See https://github.com/electron/electron/pull/15076 for more.' + this.webContents.executeJavaScript(`console.warn('${message}')`) + } + let {url, frameName} = urlFrameName v8Util.deleteHiddenValue(webContents, 'url-framename') const options = {