Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(755)

Unified Diff: third_party/WebKit/Source/core/page/Page.cpp

Issue 2491063002: [DevTools] Force contexts initialization in OOPIF case. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/Page.cpp
diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp
index 2f9b0c23b20f4912cdb19fe8c12c79f903c2d573..a0a1c592ffbd5d17c7dfc2469724bf49c74f3009 100644
--- a/third_party/WebKit/Source/core/page/Page.cpp
+++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -421,17 +421,16 @@ void Page::settingsChanged(SettingsDelegate::ChangeType changeType) {
case SettingsDelegate::DOMWorldsChange: {
if (!settings().forceMainWorldInitialization())
break;
- if (!mainFrame() || !mainFrame()->isLocalFrame())
- break;
- if (!toLocalFrame(mainFrame())
- ->loader()
- .stateMachine()
- ->committedFirstRealDocumentLoad())
- break;
for (Frame* frame = mainFrame(); frame;
frame = frame->tree().traverseNext()) {
- if (frame->isLocalFrame())
- toLocalFrame(frame)->script().initializeMainWorld();
+ if (!frame->isLocalFrame())
+ continue;
+ LocalFrame* localFrame = toLocalFrame(frame);
+ if (localFrame->loader()
+ .stateMachine()
+ ->committedFirstRealDocumentLoad()) {
+ localFrame->script().initializeMainWorld();
+ }
}
} break;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698