Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Unified Diff: third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp

Issue 1391073002: [Oilpan] Fix wrong usage off heap collections in WebDevToolsAgentImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebFrameWidgetImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebFrameWidgetImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698