chore: simplify main world setup of contextIsolation (#16046)
This commit is contained in:
parent
d6d245d0c3
commit
897c6e93cb
7 changed files with 34 additions and 49 deletions
|
@ -96,9 +96,10 @@ void AtomRenderFrameObserver::DidCreateScriptContext(
|
|||
renderer_client_->DidCreateScriptContext(context, render_frame_);
|
||||
|
||||
if (renderer_client_->isolated_world() && IsMainWorld(world_id) &&
|
||||
render_frame_->IsMainFrame()) {
|
||||
// Only the top window's main frame has isolated world.
|
||||
render_frame_->IsMainFrame() && !render_frame_->GetWebFrame()->Opener()) {
|
||||
CreateIsolatedWorldContext();
|
||||
renderer_client_->SetupMainWorldOverrides(context);
|
||||
renderer_client_->SetupMainWorldOverrides(context, render_frame_);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue