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

Unified Diff: sky/engine/core/inspector/InspectorNodeIds.cpp

Issue 683703003: Remove various Heap* types. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 | « sky/engine/core/html/imports/HTMLImportsController.cpp ('k') | sky/engine/core/page/Page.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/inspector/InspectorNodeIds.cpp
diff --git a/sky/engine/core/inspector/InspectorNodeIds.cpp b/sky/engine/core/inspector/InspectorNodeIds.cpp
index b9dfa6c0e50a35bb3c046ce0266612528489e629..4a21de13e1635f0612dfc74ed963ea3cc79a25d4 100644
--- a/sky/engine/core/inspector/InspectorNodeIds.cpp
+++ b/sky/engine/core/inspector/InspectorNodeIds.cpp
@@ -14,40 +14,6 @@
namespace blink {
-#if ENABLE(OILPAN)
-typedef HeapHashMap<WeakMember<Node>, int> NodeToIdMap;
-typedef HeapHashMap<int, WeakMember<Node> > IdToNodeMap;
-
-static NodeToIdMap& nodeToIdMap()
-{
- DEFINE_STATIC_LOCAL(Persistent<NodeToIdMap>, nodeToIdMap, (new NodeToIdMap()));
- return *nodeToIdMap;
-}
-
-static IdToNodeMap& idToNodeMap()
-{
- DEFINE_STATIC_LOCAL(Persistent<IdToNodeMap>, idToNodeMap, (new IdToNodeMap()));
- return *idToNodeMap;
-}
-
-int InspectorNodeIds::idForNode(Node* node)
-{
- static int s_nextNodeId = 1;
- NodeToIdMap::iterator it = nodeToIdMap().find(node);
- if (it != nodeToIdMap().end())
- return it->value;
- int id = s_nextNodeId++;
- nodeToIdMap().set(node, id);
- ASSERT(idToNodeMap().find(id) == idToNodeMap().end());
- idToNodeMap().set(id, node);
- return id;
-}
-
-Node* InspectorNodeIds::nodeForId(int id)
-{
- return idToNodeMap().get(id);
-}
-#else
static WeakNodeMap& nodeIds()
{
DEFINE_STATIC_LOCAL(WeakNodeMap, self, ());
@@ -70,6 +36,5 @@ Node* InspectorNodeIds::nodeForId(int id)
{
return nodeIds().node(id);
}
-#endif
}
« no previous file with comments | « sky/engine/core/html/imports/HTMLImportsController.cpp ('k') | sky/engine/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698