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

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: Make alias to simplify 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..1f2c8075b6588373746df0e72698e755f04be12f 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 WebFrameWidgetsSet& widgetImpls = WebFrameWidgetImpl::allInstances();
+ WebFrameWidgetsSet::const_iterator widgetImplsEnd = widgetImpls.end();
+ for (WebFrameWidgetsSet::const_iterator 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,8 +226,7 @@ private:
OwnPtr<WebDevToolsAgentClient::WebKitClientMessageLoop> m_messageLoop;
typedef HashSet<WebViewImpl*> FrozenViewsSet;
FrozenViewsSet m_frozenViews;
- typedef HashSet<WebFrameWidgetImpl*> FrozenWidgetsSet;
- FrozenWidgetsSet m_frozenWidgets;
+ WebFrameWidgetsSet 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