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

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

Issue 2704133002: Associate Location with DOMWindow instead of Frame. (Closed)
Patch Set: fix typos, consistent naming Created 3 years, 10 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 6a8dfce87f09f396c2f9ec1faacd5ba37d160dc2..cf7f1e3882844b71a50ca977f15274c87e880b7b 100644
--- a/third_party/WebKit/Source/core/frame/DOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
@@ -64,7 +64,7 @@ const DOMWindow* DOMWindow::toDOMWindow() const {
Location* DOMWindow::location() const {
if (!m_location)
- m_location = Location::create(frame());
+ m_location = Location::create(const_cast<DOMWindow*>(this));
return m_location.get();
}
@@ -147,15 +147,6 @@ bool DOMWindow::isInsecureScriptAccess(LocalDOMWindow& callingWindow,
return true;
}
-void DOMWindow::resetLocation() {
- // Location needs to be reset manually so that it doesn't retain a stale
- // Frame pointer.
- if (m_location) {
- m_location->reset();
- m_location = nullptr;
- }
-}
-
void DOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message,
const MessagePortArray& ports,
const String& targetOrigin,

Powered by Google App Engine
This is Rietveld 408576698