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

Unified Diff: third_party/WebKit/Source/core/dom/DOMNodeIds.cpp

Issue 2860293002: Change cc::ElementId to be a uint64_t (Closed)
Patch Set: none Created 3 years, 7 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/core/dom/DOMNodeIds.cpp
diff --git a/third_party/WebKit/Source/core/dom/DOMNodeIds.cpp b/third_party/WebKit/Source/core/dom/DOMNodeIds.cpp
index c638646e95ebb6dcd9d9248672baa674eebb32e4..a3fb870c41b47033a44772951aae70168d1d1a06 100644
--- a/third_party/WebKit/Source/core/dom/DOMNodeIds.cpp
+++ b/third_party/WebKit/Source/core/dom/DOMNodeIds.cpp
@@ -8,16 +8,18 @@
namespace blink {
-DEFINE_WEAK_IDENTIFIER_MAP(Node);
+DEFINE_WEAK_IDENTIFIER_MAP(Node, uint64_t);
// static
-int DOMNodeIds::IdForNode(Node* node) {
- return WeakIdentifierMap<Node>::Identifier(node);
+uint64_t DOMNodeIds::IdForNode(Node* node) {
+ uint64_t retval = WeakIdentifierMap<Node, uint64_t>::Identifier(node);
+ DCHECK_GT(retval, 0ull);
+ return retval;
}
// static
-Node* DOMNodeIds::NodeForId(int id) {
- return WeakIdentifierMap<Node>::Lookup(id);
+Node* DOMNodeIds::NodeForId(uint64_t id) {
+ return WeakIdentifierMap<Node, uint64_t>::Lookup(id);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698