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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptNative.cpp

Issue 1758313002: DevTools: introduce collections shim to be backed by non-wtf in v8_inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
Index: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptNative.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptNative.cpp b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptNative.cpp
index 615e228414a2d0f8b1604b35fa285e95c99fa1fd..f1ab846e74b31fca7afa21ef3974e26d76d6996e 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptNative.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptNative.cpp
@@ -5,7 +5,6 @@
#include "platform/v8_inspector/InjectedScriptNative.h"
#include "platform/inspector_protocol/Values.h"
-#include "wtf/Vector.h"
namespace blink {
@@ -67,11 +66,7 @@ void InjectedScriptNative::addObjectToGroup(int objectId, const String& groupNam
if (objectId <= 0)
return;
m_idToObjectGroupName.set(objectId, groupName);
- NameToObjectGroup::iterator groupIt = m_nameToObjectGroup.find(groupName);
- if (groupIt == m_nameToObjectGroup.end())
- m_nameToObjectGroup.set(groupName, Vector<int>()).storedValue->value.append(objectId);
- else
- groupIt->value.append(objectId);
+ m_nameToObjectGroup.get(groupName).append(objectId);
dgozman 2016/03/04 02:44:05 Restore.
pfeldman 2016/03/04 02:51:10 Done.
}
void InjectedScriptNative::releaseObjectGroup(const String& groupName)
@@ -81,9 +76,9 @@ void InjectedScriptNative::releaseObjectGroup(const String& groupName)
NameToObjectGroup::iterator groupIt = m_nameToObjectGroup.find(groupName);
if (groupIt == m_nameToObjectGroup.end())
return;
- for (int id : groupIt->value)
+ for (int id : *groupIt->second)
unbind(id);
- m_nameToObjectGroup.remove(groupIt);
+ m_nameToObjectGroup.remove(groupName);
}
String InjectedScriptNative::groupName(int objectId) const

Powered by Google App Engine
This is Rietveld 408576698