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

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: 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..500ea5f0c9095cbe3cc502cc91c09255dc4bccd4 100644
--- a/Source/bindings/core/v8/WindowProxy.cpp
+++ b/Source/bindings/core/v8/WindowProxy.cpp
@@ -226,7 +226,10 @@ 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();
yurys 2014/10/30 10:23:43 When is SecurityOrigin null?
eustas 2014/10/31 06:59:53 According to setSecurityToken implementation, it c
+ setSecurityToken(origin);
+ if (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 +238,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;
« no previous file with comments | « no previous file | Source/core/inspector/InspectorInstrumentation.idl » ('j') | Source/core/inspector/PageRuntimeAgent.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698