Index: third_party/WebKit/Source/core/frame/DOMWindow.cpp |
diff --git a/third_party/WebKit/Source/core/frame/DOMWindow.cpp b/third_party/WebKit/Source/core/frame/DOMWindow.cpp |
index 2e3704b1996e71a73ee3de270a67bf39c85bb79c..3e4723950ddf5d5b5f8e47f46bf2669a907f6d40 100644 |
--- a/third_party/WebKit/Source/core/frame/DOMWindow.cpp |
+++ b/third_party/WebKit/Source/core/frame/DOMWindow.cpp |
@@ -81,8 +81,11 @@ unsigned DOMWindow::length() const { |
return frame() ? frame()->tree().scopedChildCount() : 0; |
} |
-v8::Local<v8::Object> DOMWindow::self(ScriptState* scriptState) const { |
- return scriptState->context()->Global(); |
+DOMWindow* DOMWindow::self() const { |
+ if (!frame()) |
+ return nullptr; |
+ |
+ return frame()->domWindow(); |
} |
DOMWindow* DOMWindow::opener() const { |