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

Unified Diff: Source/bindings/core/v8/WindowProxy.cpp

Issue 686763002: Fix Runtime.executionContextCreated for crafted iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Do not force context initialization Created 6 years, 2 months 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
Index: Source/bindings/core/v8/WindowProxy.cpp
diff --git a/Source/bindings/core/v8/WindowProxy.cpp b/Source/bindings/core/v8/WindowProxy.cpp
index fa2928e3336b7c58a8ce62a200d03d8bb59b955a..eca48e09ea8e8ffc610369f1374a0d7d60d02f44 100644
--- a/Source/bindings/core/v8/WindowProxy.cpp
+++ b/Source/bindings/core/v8/WindowProxy.cpp
@@ -226,7 +226,9 @@ bool WindowProxy::initialize()
// ActivityLogger for main world is updated within updateDocument().
updateDocument();
if (m_frame->document()) {
- setSecurityToken(m_frame->document()->securityOrigin());
+ SecurityOrigin* origin = m_frame->document()->securityOrigin();
+ setSecurityToken(origin);
+ InspectorInstrumentation::didCreateMainWorldContext(m_frame, m_scriptState.get(), origin);
ContentSecurityPolicy* csp = m_frame->document()->contentSecurityPolicy();
context->AllowCodeGenerationFromStrings(csp->allowEval(0, ContentSecurityPolicy::SuppressReport));
context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_isolate, csp->evalDisabledErrorMessage()));
@@ -235,9 +237,8 @@ bool WindowProxy::initialize()
updateActivityLogger();
SecurityOrigin* origin = m_world->isolatedWorldSecurityOrigin();
setSecurityToken(origin);
- if (origin && InspectorInstrumentation::hasFrontends()) {
+ if (origin)
InspectorInstrumentation::didCreateIsolatedContext(m_frame, m_scriptState.get(), origin);
- }
}
m_frame->loader().client()->didCreateScriptContext(context, m_world->extensionGroup(), m_world->worldId());
return true;

Powered by Google App Engine
This is Rietveld 408576698