Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: third_party/WebKit/Source/core/frame/DOMWindow.cpp

Issue 2501333002: binding: Makes window/frames/self attributes return itself. (Closed)
Patch Set: Completely stopped using cached accessors. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMWindow.h ('k') | third_party/WebKit/Source/core/frame/Window.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 974ed2c3612304b6ec8e03216bc3150de99941ec..3d13295c301bf1f1ffe55080cfade9cc5ce3ed76 100644
--- a/third_party/WebKit/Source/core/frame/DOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
@@ -76,11 +76,8 @@ unsigned DOMWindow::length() const {
return frame() ? frame()->tree().scopedChildCount() : 0;
}
-DOMWindow* DOMWindow::self() const {
- if (!frame())
- return nullptr;
-
- return frame()->domWindow();
+v8::Local<v8::Object> DOMWindow::self(ScriptState* scriptState) const {
+ return scriptState->context()->Global();
}
DOMWindow* DOMWindow::opener() const {
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMWindow.h ('k') | third_party/WebKit/Source/core/frame/Window.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698