| Index: Source/bindings/core/v8/PrivateScriptRunner.cpp
|
| diff --git a/Source/bindings/core/v8/PrivateScriptRunner.cpp b/Source/bindings/core/v8/PrivateScriptRunner.cpp
|
| index 4b4343aa370ba91785c5250d35c63d564fa965b5..136998c76a9ef1dc8d46c3a14b48604ffa37330c 100644
|
| --- a/Source/bindings/core/v8/PrivateScriptRunner.cpp
|
| +++ b/Source/bindings/core/v8/PrivateScriptRunner.cpp
|
| @@ -14,6 +14,7 @@
|
| #ifndef NDEBUG
|
| #include "core/PrivateScriptSourcesForTesting.h"
|
| #endif
|
| +#include "core/dom/Document.h"
|
| #include "core/dom/ExceptionCode.h"
|
| #include "platform/PlatformResourceLoader.h"
|
|
|
| @@ -170,12 +171,10 @@ static void initializeHolderIfNeeded(ScriptState* scriptState, v8::Handle<v8::Ob
|
| }
|
| }
|
|
|
| -v8::Handle<v8::Value> PrivateScriptRunner::installClassIfNeeded(LocalFrame* frame, String className)
|
| +v8::Handle<v8::Value> PrivateScriptRunner::installClassIfNeeded(Document* document, String className)
|
| {
|
| - if (!frame)
|
| - return v8::Handle<v8::Value>();
|
| - v8::HandleScope handleScope(toIsolate(frame));
|
| - v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privateScriptIsolatedWorld());
|
| + v8::HandleScope handleScope(toIsolate(document));
|
| + v8::Handle<v8::Context> context = toV8Context(document->contextDocument().get(), DOMWrapperWorld::privateScriptIsolatedWorld());
|
| if (context.IsEmpty())
|
| return v8::Handle<v8::Value>();
|
| ScriptState* scriptState = ScriptState::from(context);
|
|
|