Index: Source/bindings/core/v8/WindowProxy.cpp |
diff --git a/Source/bindings/core/v8/WindowProxy.cpp b/Source/bindings/core/v8/WindowProxy.cpp |
index e53a48c2ecdccca7667a68821d9d5954fb7ee08b..2665e3cf0e9b3256e110d7ea499234122ae75c4b 100644 |
--- a/Source/bindings/core/v8/WindowProxy.cpp |
+++ b/Source/bindings/core/v8/WindowProxy.cpp |
@@ -106,6 +106,7 @@ void WindowProxy::disposeContext(GlobalDetachmentBehavior behavior) |
v8::HandleScope handleScope(m_isolate); |
v8::Handle<v8::Context> context = m_scriptState->context(); |
m_frame->loader().client()->willReleaseScriptContext(context, m_world->worldId()); |
+ InspectorInstrumentation::willReleaseScriptContext(m_frame, m_scriptState.get()); |
dcheng
2014/12/04 18:58:56
I'm changing WindowProxy to hold a Frame, not a Lo
eustas
2014/12/05 10:01:36
OK, but let's do it in separate patch.
|
if (behavior == DetachGlobal) |
m_scriptState->detachGlobalObject(); |
@@ -222,23 +223,24 @@ bool WindowProxy::initialize() |
return false; |
} |
+ SecurityOrigin* origin = 0; |
if (m_world->isMainWorld()) { |
// ActivityLogger for main world is updated within updateDocument(). |
updateDocument(); |
if (m_frame->document()) { |
- setSecurityToken(m_frame->document()->securityOrigin()); |
+ origin = m_frame->document()->securityOrigin(); |
+ setSecurityToken(origin); |
dcheng
2014/12/04 18:58:55
Please note I've removed this call to setSecurityT
eustas
2014/12/05 10:01:36
I've updated this place.
setSecurityToken doesn't
|
ContentSecurityPolicy* csp = m_frame->document()->contentSecurityPolicy(); |
context->AllowCodeGenerationFromStrings(csp->allowEval(0, ContentSecurityPolicy::SuppressReport)); |
context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_isolate, csp->evalDisabledErrorMessage())); |
} |
} else { |
updateActivityLogger(); |
- SecurityOrigin* origin = m_world->isolatedWorldSecurityOrigin(); |
+ origin = m_world->isolatedWorldSecurityOrigin(); |
setSecurityToken(origin); |
- if (origin && InspectorInstrumentation::hasFrontends()) { |
- InspectorInstrumentation::didCreateIsolatedContext(m_frame, m_scriptState.get(), origin); |
- } |
} |
+ if (origin) |
+ InspectorInstrumentation::didCreateScriptContext(m_frame, m_scriptState.get(), origin, m_world->isMainWorld()); |
m_frame->loader().client()->didCreateScriptContext(context, m_world->extensionGroup(), m_world->worldId()); |
return true; |
} |