| 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;
|
|
|