Index: Source/core/frame/LocalDOMWindow.cpp |
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp |
index 0dfa1b05271b5c9587a68c34c68a3249409bfed4..382992a463e93ed1aa765b3d3077dfc2037fc4d8 100644 |
--- a/Source/core/frame/LocalDOMWindow.cpp |
+++ b/Source/core/frame/LocalDOMWindow.cpp |
@@ -556,22 +556,14 @@ void LocalDOMWindow::willDetachFrameHost() |
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. |
- WillBeHeapVector<RawPtrWillBeMember<DOMWindowProperty> > properties; |
- copyToVector(m_properties, properties); |
- for (size_t i = 0; i < properties.size(); ++i) |
- properties[i]->willDestroyGlobalObjectInFrame(); |
+ for (WillBeHeapHashSet<RawPtrWillBeMember<DOMWindowProperty> >::const_iterator it = m_properties.begin(); it != m_properties.end(); ++it) |
+ (*it)->willDestroyGlobalObjectInFrame(); |
} |
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. |
- WillBeHeapVector<RawPtrWillBeMember<DOMWindowProperty> > properties; |
- copyToVector(m_properties, properties); |
- for (size_t i = 0; i < properties.size(); ++i) |
- properties[i]->willDetachGlobalObjectFromFrame(); |
+ for (WillBeHeapHashSet<RawPtrWillBeMember<DOMWindowProperty> >::const_iterator it = m_properties.begin(); it != m_properties.end(); ++it) |
+ (*it)->willDetachGlobalObjectFromFrame(); |
} |
void LocalDOMWindow::registerProperty(DOMWindowProperty* property) |
@@ -579,11 +571,6 @@ void LocalDOMWindow::registerProperty(DOMWindowProperty* property) |
m_properties.add(property); |
} |
-void LocalDOMWindow::unregisterProperty(DOMWindowProperty* property) |
-{ |
- m_properties.remove(property); |
-} |
- |
void LocalDOMWindow::reset() |
{ |
willDestroyDocumentInFrame(); |