chore: do not override history methods when rendererprocessreuse is enabled (#22335)
This commit is contained in:
parent
fd46bc653f
commit
360c1cad1b
5 changed files with 12 additions and 10 deletions
|
@ -116,10 +116,11 @@ const { hasSwitch } = process.electronBinding('command_line')
|
|||
|
||||
const contextIsolation = hasSwitch('context-isolation')
|
||||
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 }
|
||||
const isolatedWorldArgs = { ipcRendererInternal, guestInstanceId, isHiddenPage, openerId, usesNativeWindowOpen, rendererProcessReuseEnabled }
|
||||
|
||||
switch (window.location.protocol) {
|
||||
case 'devtools:': {
|
||||
|
@ -140,7 +141,7 @@ switch (window.location.protocol) {
|
|||
default: {
|
||||
// Override default web functions.
|
||||
const { windowSetup } = require('@electron/internal/renderer/window-setup')
|
||||
windowSetup(guestInstanceId, openerId, isHiddenPage, usesNativeWindowOpen)
|
||||
windowSetup(guestInstanceId, openerId, isHiddenPage, usesNativeWindowOpen, rendererProcessReuseEnabled)
|
||||
|
||||
// Inject content scripts.
|
||||
if (!process.electronBinding('features').isExtensionsEnabled()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue