Chromium Code Reviews| Index: third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp |
| diff --git a/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp b/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp |
| index 05125f1afc8bfa50f6e6e86f48224c08894f6ff7..b33fa0e21c050f23b7f0b125b1fd170f648fafe1 100644 |
| --- a/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp |
| +++ b/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp |
| @@ -160,7 +160,7 @@ private: |
| agent->flushPendingProtocolNotifications(); |
| Vector<WebViewImpl*> views; |
| - Vector<WebFrameWidgetImpl*> widgets; |
| + WillBeHeapVector<RawPtrWillBeMember<WebFrameWidgetImpl>> widgets; |
| // 1. Disable input events. |
| const HashSet<WebViewImpl*>& viewImpls = WebViewImpl::allInstances(); |
| @@ -172,9 +172,9 @@ private: |
| view->setIgnoreInputEvents(true); |
| } |
| - const HashSet<WebFrameWidgetImpl*>& widgetImpls = WebFrameWidgetImpl::allInstances(); |
| - HashSet<WebFrameWidgetImpl*>::const_iterator widgetImplsEnd = widgetImpls.end(); |
| - for (HashSet<WebFrameWidgetImpl*>::const_iterator it = widgetImpls.begin(); it != widgetImplsEnd; ++it) { |
| + const WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<WebFrameWidgetImpl>>& widgetImpls = WebFrameWidgetImpl::allInstances(); |
| + WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<WebFrameWidgetImpl>>::const_iterator widgetImplsEnd = widgetImpls.end(); |
| + for (auto it = widgetImpls.begin(); it != widgetImplsEnd; ++it) { |
| WebFrameWidgetImpl* widget = *it; |
| m_frozenWidgets.add(widget); |
| widgets.append(widget); |
| @@ -200,7 +200,7 @@ private: |
| (*it)->setIgnoreInputEvents(false); |
| } |
| } |
| - for (Vector<WebFrameWidgetImpl*>::iterator it = widgets.begin(); it != widgets.end(); ++it) { |
| + for (WillBeHeapVector<RawPtrWillBeMember<WebFrameWidgetImpl>>::iterator it = widgets.begin(); it != widgets.end(); ++it) { |
| if (m_frozenWidgets.contains(*it)) { |
| // The widget was not closed during the dispatch. |
| (*it)->setIgnoreInputEvents(false); |
| @@ -226,7 +226,7 @@ private: |
| OwnPtr<WebDevToolsAgentClient::WebKitClientMessageLoop> m_messageLoop; |
| typedef HashSet<WebViewImpl*> FrozenViewsSet; |
| FrozenViewsSet m_frozenViews; |
| - typedef HashSet<WebFrameWidgetImpl*> FrozenWidgetsSet; |
| + typedef WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<WebFrameWidgetImpl>> FrozenWidgetsSet; |
|
haraken
2015/10/14 08:12:13
Can we move the typedef to the header file and use
peria
2015/10/15 02:26:06
Done.
|
| FrozenWidgetsSet m_frozenWidgets; |
| static ClientMessageLoopAdapter* s_instance; |
| }; |