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..2cd664c51470d2e57ede7d6ac2a0ff526216a8b3 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(); |
| - resetDOMWindowProperties(); |
| -} |
| - |
| -void LocalDOMWindow::resetDOMWindowProperties() |
| -{ |
| m_properties.clear(); |
| m_screen = nullptr; |
| @@ -1897,7 +1893,9 @@ PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo |
| void LocalDOMWindow::trace(Visitor* visitor) |
| { |
| +#if ENABLE(OILPAN) |
| visitor->trace(m_document); |
| + visitor->trace(m_properties); |
| visitor->trace(m_screen); |
| visitor->trace(m_history); |
| visitor->trace(m_locationbar); |
| @@ -1919,6 +1917,7 @@ void LocalDOMWindow::trace(Visitor* visitor) |
| WillBeHeapSupplementable<LocalDOMWindow>::trace(visitor); |
| EventTargetWithInlineData::trace(visitor); |
| LifecycleContext<LocalDOMWindow>::trace(visitor); |
| +#endif |
|
Mads Ager (chromium)
2014/09/09 13:07:25
Sorry, my mistake, the plugin complaints, the call
sof
2014/09/09 13:15:45
I left it as not tracing the local fields, non-Oil
|
| } |
| } // namespace blink |