summaryrefslogtreecommitdiff
path: root/deps/v8/src/handles/handles.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/handles/handles.cc')
-rw-r--r--deps/v8/src/handles/handles.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/deps/v8/src/handles/handles.cc b/deps/v8/src/handles/handles.cc
index 85072a375a..aee0e27f20 100644
--- a/deps/v8/src/handles/handles.cc
+++ b/deps/v8/src/handles/handles.cc
@@ -41,6 +41,7 @@ bool HandleBase::IsDereferenceAllowed() const {
RootsTable::IsImmortalImmovable(root_index)) {
return true;
}
+ if (isolate->IsBuiltinsTableHandleLocation(location_)) return true;
LocalHeap* local_heap = LocalHeap::Current();
if (FLAG_local_heaps && local_heap) {
@@ -175,12 +176,12 @@ Address* CanonicalHandleScope::Lookup(Address object) {
return isolate_->root_handle(root_index).location();
}
}
- Address** entry = identity_map_->Get(Object(object));
- if (*entry == nullptr) {
+ auto find_result = identity_map_->FindOrInsert(Object(object));
+ if (!find_result.already_exists) {
// Allocate new handle location.
- *entry = HandleScope::CreateHandle(isolate_, object);
+ *find_result.entry = HandleScope::CreateHandle(isolate_, object);
}
- return *entry;
+ return *find_result.entry;
}
std::unique_ptr<CanonicalHandlesMap>