| Index: Source/bindings/v8/ScriptController.cpp
|
| diff --git a/Source/bindings/v8/ScriptController.cpp b/Source/bindings/v8/ScriptController.cpp
|
| index b171af01ab9f857cfa5538ca106baf9544d207c9..7b61e887409778bb1643107872fb572c14add20c 100644
|
| --- a/Source/bindings/v8/ScriptController.cpp
|
| +++ b/Source/bindings/v8/ScriptController.cpp
|
| @@ -262,10 +262,11 @@ V8WindowShell* ScriptController::windowShell(DOMWrapperWorld* world)
|
|
|
| bool ScriptController::shouldBypassMainWorldContentSecurityPolicy()
|
| {
|
| + v8::Handle<v8::Context> context = m_isolate->GetCurrentContext();
|
| + if (context.IsEmpty() || !toDOMWindow(context))
|
| + return false;
|
| DOMWrapperWorld* world = DOMWrapperWorld::current(m_isolate);
|
| - if (world && world->isIsolatedWorld())
|
| - return world->isolatedWorldHasContentSecurityPolicy();
|
| - return false;
|
| + return world->isIsolatedWorld() ? world->isolatedWorldHasContentSecurityPolicy() : false;
|
| }
|
|
|
| TextPosition ScriptController::eventHandlerPosition() const
|
|
|