diff options
Diffstat (limited to 'deps/v8/src/objects/contexts-inl.h')
-rw-r--r-- | deps/v8/src/objects/contexts-inl.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/deps/v8/src/objects/contexts-inl.h b/deps/v8/src/objects/contexts-inl.h index 33df9915646..8bd41722f1f 100644 --- a/deps/v8/src/objects/contexts-inl.h +++ b/deps/v8/src/objects/contexts-inl.h @@ -245,14 +245,18 @@ Map Context::GetInitialJSArrayMap(ElementsKind kind) const { return Map::cast(initial_js_array_map); } -MicrotaskQueue* NativeContext::microtask_queue() const { +DEF_GETTER(NativeContext, microtask_queue, MicrotaskQueue*) { + ExternalPointer_t encoded_value = + ReadField<ExternalPointer_t>(kMicrotaskQueueOffset); return reinterpret_cast<MicrotaskQueue*>( - ReadField<Address>(kMicrotaskQueueOffset)); + DecodeExternalPointer(isolate, encoded_value)); } -void NativeContext::set_microtask_queue(MicrotaskQueue* microtask_queue) { - WriteField<Address>(kMicrotaskQueueOffset, - reinterpret_cast<Address>(microtask_queue)); +void NativeContext::set_microtask_queue(Isolate* isolate, + MicrotaskQueue* microtask_queue) { + ExternalPointer_t encoded_value = EncodeExternalPointer( + isolate, reinterpret_cast<Address>(microtask_queue)); + WriteField<ExternalPointer_t>(kMicrotaskQueueOffset, encoded_value); } OSROptimizedCodeCache NativeContext::GetOSROptimizedCodeCache() { |