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

Unified Diff: third_party/WebKit/Source/platform/inspector_protocol/Collections.h

Issue 2087953004: Switch v8 inspector to stl collections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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/inspector_protocol/Collections.h
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Collections.h b/third_party/WebKit/Source/platform/inspector_protocol/Collections.h
index 6309284488683e07064463b67b8c87cc9e45666e..fb9b08fd2e1ebac0b4bb352bb1980481260d9ede 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/Collections.h
+++ b/third_party/WebKit/Source/platform/inspector_protocol/Collections.h
@@ -5,15 +5,38 @@
#ifndef Collections_h
#define Collections_h
-#if V8_INSPECTOR_USE_STL
-#include "platform/inspector_protocol/CollectionsSTL.h"
+#include <cstddef>
+
+#if V8_INSPECTOR_USE_OLD_STL
+#include <map>
+#include <set>
+
+namespace blink {
+namespace protocol {
+
+template <class Key, class T> using HashMap = std::map<Key, T>;
+template <class Key> using HashSet = std::set<Key>;
+
+} // namespace protocol
+} // namespace blink
+
#else
-#include "platform/inspector_protocol/CollectionsWTF.h"
-#endif // V8_INSPECTOR_USE_STL
+#include <unordered_map>
+#include <unordered_set>
+
+namespace blink {
+namespace protocol {
+
+template <class Key, class T> using HashMap = std::unordered_map<Key, T>;
+template <class Key> using HashSet = std::unordered_set<Key>;
+} // namespace protocol
+} // namespace blink
+
+#endif // V8_INSPECTOR_USE_STL
// Macro that returns a compile time constant with the length of an array, but gives an error if passed a non-array.
-template<typename T, size_t Size> char (&ArrayLengthHelperFunction(T (&)[Size]))[Size];
+template<typename T, std::size_t Size> char (&ArrayLengthHelperFunction(T (&)[Size]))[Size];
// GCC needs some help to deduce a 0 length array.
#if defined(__GNUC__)
template<typename T> char (&ArrayLengthHelperFunction(T (&)[0]))[0];

Powered by Google App Engine
This is Rietveld 408576698