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

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

Issue 711853002: Revert of Fix Runtime.executionContextCreated for crafted iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | « Source/bindings/core/v8/ScriptController.cpp ('k') | Source/core/inspector/InspectorInstrumentation.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/WindowProxy.cpp
diff --git a/Source/bindings/core/v8/WindowProxy.cpp b/Source/bindings/core/v8/WindowProxy.cpp
index 79a139071c788cb8a274705063e70f92ad373f01..5b3cf06ff00c9d984043e1030d18741b6c9f99fc 100644
--- a/Source/bindings/core/v8/WindowProxy.cpp
+++ b/Source/bindings/core/v8/WindowProxy.cpp
@@ -226,10 +226,7 @@
// ActivityLogger for main world is updated within updateDocument().
updateDocument();
if (m_frame->document()) {
- SecurityOrigin* origin = m_frame->document()->securityOrigin();
- ASSERT(origin);
- setSecurityToken(origin);
- InspectorInstrumentation::didCreateMainWorldContext(m_frame, m_scriptState.get(), origin);
+ setSecurityToken(m_frame->document()->securityOrigin());
ContentSecurityPolicy* csp = m_frame->document()->contentSecurityPolicy();
context->AllowCodeGenerationFromStrings(csp->allowEval(0, ContentSecurityPolicy::SuppressReport));
context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_isolate, csp->evalDisabledErrorMessage()));
@@ -238,8 +235,9 @@
updateActivityLogger();
SecurityOrigin* origin = m_world->isolatedWorldSecurityOrigin();
setSecurityToken(origin);
- if (origin)
+ if (origin && InspectorInstrumentation::hasFrontends()) {
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 | « Source/bindings/core/v8/ScriptController.cpp ('k') | Source/core/inspector/InspectorInstrumentation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698