refactor: port window.open and window.opener to use ctx bridge instead of hole punching (#23235)
* refactor: port window.open and window.opener to use ctx bridge instead of hole punching * refactor: only run the isolated init bundle when webview is enabled
This commit is contained in:
parent
c68589f212
commit
abe5cf398c
11 changed files with 178 additions and 85 deletions
|
@ -232,6 +232,10 @@ void ElectronSandboxedRendererClient::DidCreateScriptContext(
|
|||
void ElectronSandboxedRendererClient::SetupMainWorldOverrides(
|
||||
v8::Handle<v8::Context> context,
|
||||
content::RenderFrame* render_frame) {
|
||||
// We only need to run the isolated bundle if webview is enabled
|
||||
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kWebviewTag))
|
||||
return;
|
||||
|
||||
// Setup window overrides in the main world context
|
||||
// Wrap the bundle into a function that receives the isolatedWorld as
|
||||
// an argument.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue