Index: src/address-map.cc |
diff --git a/src/address-map.cc b/src/address-map.cc |
index 3122b33693488e5e27c1e36881d89d8fa7fc9b1e..79f8e62d5454f23ceb173e19b01993828a2d90e0 100644 |
--- a/src/address-map.cc |
+++ b/src/address-map.cc |
@@ -13,7 +13,7 @@ namespace internal { |
RootIndexMap::RootIndexMap(Isolate* isolate) { |
map_ = isolate->root_index_map(); |
if (map_ != NULL) return; |
- map_ = new base::HashMap(); |
+ map_ = new HeapObjectToIndexHashMap(); |
for (uint32_t i = 0; i < Heap::kStrongRootListLength; i++) { |
Heap::RootListIndex root_index = static_cast<Heap::RootListIndex>(i); |
Object* root = isolate->heap()->root(root_index); |
@@ -22,12 +22,12 @@ RootIndexMap::RootIndexMap(Isolate* isolate) { |
// not be referenced through the root list in the snapshot. |
if (isolate->heap()->RootCanBeTreatedAsConstant(root_index)) { |
HeapObject* heap_object = HeapObject::cast(root); |
- base::HashMap::Entry* entry = LookupEntry(map_, heap_object, false); |
- if (entry != NULL) { |
+ Maybe<uint32_t> maybe_index = map_->Get(heap_object); |
+ if (maybe_index.IsJust()) { |
// Some are initialized to a previous value in the root list. |
- DCHECK_LT(GetValue(entry), i); |
+ DCHECK_LT(maybe_index.FromJust(), i); |
} else { |
- SetValue(LookupEntry(map_, heap_object, true), i); |
+ map_->Set(heap_object, i); |
} |
} else { |
// Immortal immovable root objects are constant and allocated on the first |