Chromium Code Reviews| Index: Source/core/frame/LocalDOMWindow.cpp |
| diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp |
| index 6c930d737ed8ddeac2084ccfee6205259667d83b..ed6e8f7e453f32877741cdea9a05f287bb0193ec 100644 |
| --- a/Source/core/frame/LocalDOMWindow.cpp |
| +++ b/Source/core/frame/LocalDOMWindow.cpp |
| @@ -497,7 +497,6 @@ void LocalDOMWindow::statePopped(PassRefPtr<SerializedScriptValue> stateObject) |
| LocalDOMWindow::~LocalDOMWindow() |
| { |
| ASSERT(m_hasBeenReset); |
| - reset(); |
| #if ENABLE(OILPAN) |
| // Oilpan: the frame host and document objects are |
| @@ -508,6 +507,8 @@ LocalDOMWindow::~LocalDOMWindow() |
| // Cleared when detaching document. |
| ASSERT(!m_eventQueue); |
| #else |
| + reset(); |
| + |
| removeAllEventListenersInternal(DoBroadcastListenerRemoval); |
| ASSERT(m_document->isStopped()); |
| @@ -557,7 +558,7 @@ void LocalDOMWindow::willDestroyDocumentInFrame() |
| { |
| // It is necessary to copy m_properties to a separate vector because the DOMWindowProperties may |
| // unregister themselves from the LocalDOMWindow as a result of the call to willDestroyGlobalObjectInFrame. |
| - Vector<DOMWindowProperty*> properties; |
| + WillBeHeapVector<RawPtrWillBeMember<DOMWindowProperty> > properties; |
| copyToVector(m_properties, properties); |
| for (size_t i = 0; i < properties.size(); ++i) |
| properties[i]->willDestroyGlobalObjectInFrame(); |
| @@ -567,7 +568,7 @@ void LocalDOMWindow::willDetachDocumentFromFrame() |
| { |
| // It is necessary to copy m_properties to a separate vector because the DOMWindowProperties may |
| // unregister themselves from the LocalDOMWindow as a result of the call to willDetachGlobalObjectFromFrame. |
| - Vector<DOMWindowProperty*> properties; |
| + WillBeHeapVector<RawPtrWillBeMember<DOMWindowProperty> > properties; |
| copyToVector(m_properties, properties); |
| for (size_t i = 0; i < properties.size(); ++i) |
| properties[i]->willDetachGlobalObjectFromFrame(); |
| @@ -586,11 +587,6 @@ void LocalDOMWindow::unregisterProperty(DOMWindowProperty* property) |
| void LocalDOMWindow::reset() |
| { |
| willDestroyDocumentInFrame(); |
|
Mads Ager (chromium)
2014/09/09 12:09:44
Look at all of this stuff we don't have to do in t
|
| - resetDOMWindowProperties(); |
| -} |
| - |
| -void LocalDOMWindow::resetDOMWindowProperties() |
| -{ |
| m_properties.clear(); |
| m_screen = nullptr; |
| @@ -1898,6 +1894,9 @@ PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo |
| void LocalDOMWindow::trace(Visitor* visitor) |
| { |
| visitor->trace(m_document); |
| +#if ENABLE(OILPAN) |
|
Mads Ager (chromium)
2014/09/09 12:09:44
nit: maybe just have the if around the entire body
sof
2014/09/09 12:53:58
ok.
|
| + visitor->trace(m_properties); |
| +#endif |
| visitor->trace(m_screen); |
| visitor->trace(m_history); |
| visitor->trace(m_locationbar); |