diff --git a/src/base_object-inl.h b/src/base_object-inl.h index 9ac29633449b7f..2ca432e2dfd3c6 100644 --- a/src/base_object-inl.h +++ b/src/base_object-inl.h @@ -135,7 +135,8 @@ template void BaseObject::InternalFieldGet( v8::Local property, const v8::PropertyCallbackInfo& info) { - info.GetReturnValue().Set(info.This()->GetInternalField(Field)); + info.GetReturnValue().Set( + info.This()->GetInternalField(Field).As()); } template diff --git a/src/module_wrap.cc b/src/module_wrap.cc index 77ee0dc9109ebb..2dca349bd97089 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -78,7 +78,7 @@ ModuleWrap::~ModuleWrap() { } Local ModuleWrap::context() const { - Local obj = object()->GetInternalField(kContextObjectSlot); + Local obj = object()->GetInternalField(kContextObjectSlot).As(); if (obj.IsEmpty()) return {}; return obj.As()->GetCreationContext().ToLocalChecked(); } @@ -684,7 +684,9 @@ MaybeLocal ModuleWrap::SyntheticModuleEvaluationStepsCallback( TryCatchScope try_catch(env); Local synthetic_evaluation_steps = - obj->object()->GetInternalField(kSyntheticEvaluationStepsSlot) + obj->object() + ->GetInternalField(kSyntheticEvaluationStepsSlot) + .As() .As(); obj->object()->SetInternalField( kSyntheticEvaluationStepsSlot, Undefined(isolate)); diff --git a/src/node_file.cc b/src/node_file.cc index eb1c9b8dd90dcf..c478485fd92e47 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -456,7 +456,7 @@ MaybeLocal FileHandle::ClosePromise() { Local context = env()->context(); Local close_resolver = - object()->GetInternalField(FileHandle::kClosingPromiseSlot); + object()->GetInternalField(FileHandle::kClosingPromiseSlot).As(); if (!close_resolver.IsEmpty() && !close_resolver->IsUndefined()) { CHECK(close_resolver->IsPromise()); return close_resolver.As(); diff --git a/src/node_task_queue.cc b/src/node_task_queue.cc index 5d0e2b0d4c7ba1..1a0cb082a2534f 100644 --- a/src/node_task_queue.cc +++ b/src/node_task_queue.cc @@ -50,7 +50,7 @@ static Maybe GetAssignedPromiseWrapAsyncId(Environment* env, // be an object. If it's not, we just ignore it. Ideally v8 would // have had GetInternalField returning a MaybeLocal but this works // for now. - Local promiseWrap = promise->GetInternalField(0); + Local promiseWrap = promise->GetInternalField(0).As(); if (promiseWrap->IsObject()) { Local maybe_async_id; if (!promiseWrap.As()->Get(env->context(), id_symbol) diff --git a/src/node_zlib.cc b/src/node_zlib.cc index fac116f9e6b3e2..0c4ae0fc794347 100644 --- a/src/node_zlib.cc +++ b/src/node_zlib.cc @@ -423,7 +423,8 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork { UpdateWriteResult(); // call the write() cb - Local cb = object()->GetInternalField(kWriteJSCallback); + Local cb = + object()->GetInternalField(kWriteJSCallback).template As(); MakeCallback(cb.As(), 0, nullptr); if (pending_close_) diff --git a/src/stream_base.cc b/src/stream_base.cc index 65dab1ccac7cde..cfb1e3ae6a2d7d 100644 --- a/src/stream_base.cc +++ b/src/stream_base.cc @@ -470,8 +470,9 @@ MaybeLocal StreamBase::CallJSOnreadMethod(ssize_t nread, AsyncWrap* wrap = GetAsyncWrap(); CHECK_NOT_NULL(wrap); - Local onread = wrap->object()->GetInternalField( - StreamBase::kOnReadFunctionField); + Local onread = wrap->object() + ->GetInternalField(StreamBase::kOnReadFunctionField) + .As(); CHECK(onread->IsFunction()); return wrap->MakeCallback(onread.As(), arraysize(argv), argv); }