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

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

Issue 2642643002: Remove CallWith=ScriptState from window/self/frames getters on Window.
Patch Set: Created 3 years, 11 months 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
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..5ee88b28ba3fc3cf3fdd4ba51383b4aeaec35639 100644
--- a/third_party/WebKit/Source/core/frame/DOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
@@ -4,6 +4,7 @@
#include "core/frame/DOMWindow.h"
+#include "bindings/core/v8/WindowProxyManager.h"
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/ExecutionContext.h"
@@ -34,7 +35,10 @@
namespace blink {
-DOMWindow::DOMWindow(Frame& frame) : m_frame(frame), m_windowIsClosing(false) {}
+DOMWindow::DOMWindow(Frame& frame)
+ : m_frame(frame),
+ m_windowProxyManager(frame.getWindowProxyManager()),
+ m_windowIsClosing(false) {}
DOMWindow::~DOMWindow() {
// The frame must be disconnected before finalization.
@@ -81,8 +85,8 @@ unsigned DOMWindow::length() const {
return frame() ? frame()->tree().scopedChildCount() : 0;
}
-v8::Local<v8::Object> DOMWindow::self(ScriptState* scriptState) const {
- return scriptState->context()->Global();
+WindowProxyManagerBase* DOMWindow::self() const {
+ return m_windowProxyManager.get();
}
DOMWindow* DOMWindow::opener() const {
@@ -435,6 +439,7 @@ void DOMWindow::focus(ExecutionContext* context) {
DEFINE_TRACE(DOMWindow) {
visitor->trace(m_frame);
+ visitor->trace(m_windowProxyManager);
visitor->trace(m_location);
EventTargetWithInlineData::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698