Only create isolated context in main frame
This commit is contained in:
parent
2e62d81c24
commit
dcf9a395c2
1 changed files with 3 additions and 2 deletions
|
@ -139,7 +139,7 @@ class AtomRenderFrameObserver : public content::RenderFrameObserver {
|
|||
}
|
||||
|
||||
bool ShouldNotifyClient(int world_id) {
|
||||
if (renderer_client_->isolated_world())
|
||||
if (renderer_client_->isolated_world() && render_frame_->IsMainFrame())
|
||||
return IsIsolatedWorld(world_id);
|
||||
else
|
||||
return IsMainWorld(world_id);
|
||||
|
@ -151,7 +151,8 @@ class AtomRenderFrameObserver : public content::RenderFrameObserver {
|
|||
if (ShouldNotifyClient(world_id))
|
||||
renderer_client_->DidCreateScriptContext(context, render_frame_);
|
||||
|
||||
if (renderer_client_->isolated_world() && IsMainWorld(world_id)) {
|
||||
if (renderer_client_->isolated_world() && IsMainWorld(world_id)
|
||||
&& render_frame_->IsMainFrame()) {
|
||||
CreateIsolatedWorldContext();
|
||||
SetupMainWorldOverrides(context);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue