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

Unified Diff: Source/core/frame/LocalDOMWindow.cpp

Issue 879423003: Move Location to DOMWindow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: reset during willDetachFrameHost Created 5 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: Source/core/frame/LocalDOMWindow.cpp
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
index 330ecedd3935f06c134ef88d5b910aa8148e6a9c..471e16f25666b66c7786b7a2d79b197e0bd5cacd 100644
--- a/Source/core/frame/LocalDOMWindow.cpp
+++ b/Source/core/frame/LocalDOMWindow.cpp
@@ -591,6 +591,7 @@ void LocalDOMWindow::willDetachFrameHost()
{
frame()->host()->eventHandlerRegistry().didRemoveAllEventHandlers(*this);
frame()->host()->consoleMessageStorage().frameWindowDiscarded(this);
+ resetLocation();
LocalDOMWindow::notifyContextDestroyed();
}
@@ -632,13 +633,14 @@ void LocalDOMWindow::reset()
m_console = nullptr;
m_navigator = nullptr;
m_performance = nullptr;
- m_location = nullptr;
m_media = nullptr;
m_applicationCache = nullptr;
#if ENABLE(ASSERT)
m_hasBeenReset = true;
#endif
+ resetLocation();
+
LocalDOMWindow::notifyContextDestroyed();
}
@@ -772,13 +774,6 @@ Performance* LocalDOMWindow::performance() const
return m_performance.get();
}
-Location* LocalDOMWindow::location() const
-{
- if (!m_location)
- m_location = Location::create(frame());
- return m_location.get();
-}
-
void LocalDOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePortArray* ports, const String& targetOrigin, LocalDOMWindow* source, ExceptionState& exceptionState)
{
if (!isCurrentlyDisplayedInFrame())
@@ -1821,7 +1816,6 @@ void LocalDOMWindow::trace(Visitor* visitor)
visitor->trace(m_toolbar);
visitor->trace(m_console);
visitor->trace(m_navigator);
- visitor->trace(m_location);
visitor->trace(m_media);
visitor->trace(m_applicationCache);
visitor->trace(m_performance);

Powered by Google App Engine
This is Rietveld 408576698