diff --git a/lib/renderer/init.ts b/lib/renderer/init.ts index bcae9d61c8..d1e32045ae 100644 --- a/lib/renderer/init.ts +++ b/lib/renderer/init.ts @@ -84,9 +84,6 @@ const appPath = parseOption('app-path', null); const guestInstanceId = parseOption('guest-instance-id', null, value => parseInt(value)); const openerId = parseOption('opener-id', null, value => parseInt(value)); -// The arguments to be passed to isolated world. -const isolatedWorldArgs = { ipcRendererInternal, guestInstanceId, isHiddenPage, openerId, usesNativeWindowOpen, rendererProcessReuseEnabled }; - // The webContents preload script is loaded after the session preload scripts. if (preloadScript) { preloadScripts.push(preloadScript); @@ -116,11 +113,6 @@ if (process.isMainFrame) { webViewInit(contextIsolation, webviewTag, guestInstanceId); } -// Pass the arguments to isolatedWorld. -if (contextIsolation) { - v8Util.setHiddenValue(global, 'isolated-world-args', isolatedWorldArgs); -} - if (nodeIntegration) { // Export node bindings to global. const { makeRequireFunction } = __non_webpack_require__('internal/modules/cjs/helpers') // eslint-disable-line diff --git a/lib/sandboxed_renderer/init.js b/lib/sandboxed_renderer/init.js index 4acd443d53..3b0a3a9dcc 100644 --- a/lib/sandboxed_renderer/init.js +++ b/lib/sandboxed_renderer/init.js @@ -124,9 +124,6 @@ const isHiddenPage = hasSwitch('hidden-page'); const rendererProcessReuseEnabled = hasSwitch('disable-electron-site-instance-overrides'); const usesNativeWindowOpen = true; -// The arguments to be passed to isolated world. -const isolatedWorldArgs = { ipcRendererInternal, guestInstanceId, isHiddenPage, openerId, usesNativeWindowOpen, rendererProcessReuseEnabled }; - switch (window.location.protocol) { case 'devtools:': { // Override some inspector APIs. @@ -152,11 +149,6 @@ if (process.isMainFrame) { webViewInit(contextIsolation, isWebViewTagEnabled, guestInstanceId); } -// Pass the arguments to isolatedWorld. -if (contextIsolation) { - v8Util.setHiddenValue(global, 'isolated-world-args', isolatedWorldArgs); -} - // Wrap the script into a function executed in global scope. It won't have // access to the current scope, so we'll expose a few objects as arguments: //