Chromium Code Reviews| 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); |
|
aandrey
2014/11/04 11:21:07
ASSERT(origin);
eustas
2014/11/05 21:28:34
Done.
|
| 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; |