Chromium Code Reviews| Index: Source/core/frame/DOMWindow.cpp |
| diff --git a/Source/core/frame/DOMWindow.cpp b/Source/core/frame/DOMWindow.cpp |
| index 10606a074f8f36bb6f5dd7b735ef1a6dfd0ad80a..ac964179ebc13aa4526e8db405b9a08ca37b573c 100644 |
| --- a/Source/core/frame/DOMWindow.cpp |
| +++ b/Source/core/frame/DOMWindow.cpp |
| @@ -8,11 +8,24 @@ |
| #include "core/dom/SecurityContext.h" |
| #include "core/frame/Frame.h" |
| #include "core/frame/FrameClient.h" |
| +#include "core/frame/Location.h" |
| #include "platform/weborigin/KURL.h" |
| #include "platform/weborigin/SecurityOrigin.h" |
| namespace blink { |
| +DOMWindow::~DOMWindow() |
| +{ |
| + reset(); |
|
sof
2015/02/03 21:25:10
This is problematic in an Oilpan setting, as destr
sof
2015/02/03 21:28:06
s/rest/reset/g
Nate Chapin
2015/02/06 19:39:58
Resetting the location in willDetachFrameHost() ha
sof
2015/02/07 17:09:32
I see, somewhat similar to changes seen for https:
Nate Chapin
2015/02/09 19:05:57
There was a single layout test that had output cha
|
| +} |
| + |
| +Location* DOMWindow::location() const |
| +{ |
| + if (!m_location) |
| + m_location = Location::create(frame()); |
| + return m_location.get(); |
| +} |
| + |
| bool DOMWindow::closed() const |
| { |
| return !frame() || !frame()->host(); |
| @@ -92,4 +105,13 @@ bool DOMWindow::isInsecureScriptAccess(DOMWindow& callingWindow, const String& u |
| return true; |
| } |
| +void DOMWindow::reset() |
| +{ |
| + // Location needs to be reset manually because it doesn't inherit from DOMWindowProperty. |
| + if (m_location) { |
| + m_location->reset(); |
| + m_location = nullptr; |
| + } |
| +} |
| + |
| } // namespace blink |