Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / v8 / custom / V8HTMLDocumentCustom.cpp
index 66e00e1..061ce14 100644 (file)
@@ -58,7 +58,7 @@ void V8HTMLDocument::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&
     if (info.Length() > 2) {
         if (RefPtr<Frame> frame = htmlDocument->frame()) {
             // Fetch the global object for the frame.
-            v8::Local<v8::Context> context = frame->script().currentWorldContextOrMainWorldContext();
+            v8::Local<v8::Context> context = toV8Context(info.GetIsolate(), frame.get(), DOMWrapperWorld::current(info.GetIsolate()));
             // Bail out if we cannot get the context.
             if (context.IsEmpty())
                 return;
@@ -80,7 +80,7 @@ void V8HTMLDocument::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&
         }
     }
 
-    htmlDocument->open(activeDOMWindow()->document());
+    htmlDocument->open(activeDOMWindow(info.GetIsolate())->document());
     v8SetReturnValue(info, info.Holder());
 }