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.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/deps/v8/src/handles/handles.cc b/deps/v8/src/handles/handles.cc
index 332dc723b0..8cfe353f9a 100644
--- a/deps/v8/src/handles/handles.cc
+++ b/deps/v8/src/handles/handles.cc
@@ -58,7 +58,11 @@ bool HandleBase::IsDereferenceAllowed() const {
if (!AllowHandleDereference::IsAllowed()) return false;
// Allocations in the shared heap may be dereferenced by multiple threads.
- if (heap_object.InSharedWritableHeap()) return true;
+ if (heap_object.InWritableSharedSpace()) return true;
+
+ // Deref is explicitly allowed from any thread. Used for running internal GC
+ // epilogue callbacks in the safepoint after a GC.
+ if (AllowHandleDereferenceAllThreads::IsAllowed()) return true;
LocalHeap* local_heap = isolate->CurrentLocalHeap();
@@ -99,7 +103,7 @@ bool DirectHandle<T>::IsDereferenceAllowed() const {
if (!AllowHandleDereference::IsAllowed()) return false;
// Allocations in the shared heap may be dereferenced by multiple threads.
- if (isolate->is_shared()) return true;
+ if (heap_object.InWritableSharedSpace()) return true;
LocalHeap* local_heap = isolate->CurrentLocalHeap();