fix: load window-setup in sandboxed renderer (#21416)

This commit is contained in:
Milan Burda 2020-01-06 22:23:03 +01:00 committed by Alexey Kuzmin
parent d56f67b7af
commit 31c93fec67
7 changed files with 89 additions and 61 deletions

View file

@ -112,11 +112,15 @@ ipcMainUtils.handleSync('ELECTRON_BROWSER_SANDBOX_LOAD', async function (event)
contentScripts = getContentScripts()
}
const webPreferences = event.sender.getLastWebPreferences() || {}
return {
contentScripts,
preloadScripts: await Promise.all(preloadPaths.map(path => getPreloadScript(path))),
isRemoteModuleEnabled: isRemoteModuleEnabled(event.sender),
isWebViewTagEnabled: guestViewManager.isWebViewTagEnabled(event.sender),
guestInstanceId: webPreferences.guestInstanceId,
openerId: webPreferences.openerId,
process: {
arch: process.arch,
platform: process.platform,