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

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

Issue 2626403002: Move Frame pointer to be held by DOMWindow base class. (Closed)
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 3ce520e29d11f9218b229563efac151e4b206684..c5f9123abe5fcdfee1c1703cde0cd8c0a3483ff5 100644
--- a/third_party/WebKit/Source/core/frame/DOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
@@ -34,9 +34,12 @@
namespace blink {
-DOMWindow::DOMWindow() : m_windowIsClosing(false) {}
+DOMWindow::DOMWindow(Frame& frame) : m_frame(frame), m_windowIsClosing(false) {}
-DOMWindow::~DOMWindow() {}
+DOMWindow::~DOMWindow() {
+ // The frame must be disconnected before finalization.
+ DCHECK(!m_frame);
+}
v8::Local<v8::Object> DOMWindow::wrap(v8::Isolate*,
v8::Local<v8::Object> creationContext) {
@@ -432,6 +435,7 @@ void DOMWindow::focus(ExecutionContext* context) {
}
DEFINE_TRACE(DOMWindow) {
+ visitor->trace(m_frame);
visitor->trace(m_location);
EventTargetWithInlineData::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698