diff --git a/patches/node/.patches b/patches/node/.patches index 8ae2af0dd1c5a..11ee2997aec57 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -35,7 +35,6 @@ fix_do_not_resolve_electron_entrypoints.patch fix_ftbfs_werror_wextra-semi.patch ci_ensure_node_tests_set_electron_run_as_node.patch fix_assert_module_in_the_renderer_process.patch -src_cast_v8_object_getinternalfield_return_value_to_v8_value.patch fix_add_trusted_space_and_trusted_lo_space_to_the_v8_heap.patch tls_ensure_tls_sockets_are_closed_if_the_underlying_wrap_closes.patch test_deflake_test-tls-socket-close.patch diff --git a/patches/node/src_cast_v8_object_getinternalfield_return_value_to_v8_value.patch b/patches/node/src_cast_v8_object_getinternalfield_return_value_to_v8_value.patch deleted file mode 100644 index 7f36ca0997e87..0000000000000 --- a/patches/node/src_cast_v8_object_getinternalfield_return_value_to_v8_value.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Joyee Cheung -Date: Wed, 2 Aug 2023 04:14:35 +0200 -Subject: src: cast v8::Object::GetInternalField() return value to v8::Value -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -In preparation of https://chromium-review.googlesource.com/c/v8/v8/+/4707972 -which changes the return value to v8::Data. - -PR-URL: https://github.com/nodejs/node/pull/48943 -Reviewed-By: Juan José Arboleda -Reviewed-By: Mohammed Keyvanzadeh -Reviewed-By: Tobias Nießen -Reviewed-By: Chengzhong Wu -Reviewed-By: Stephen Belanger -Reviewed-By: Jiawen Geng - -diff --git a/src/base_object-inl.h b/src/base_object-inl.h -index f003f1390b864f2f3874ec144b413fe5cec2dc56..0148c75427985e2ff034fafb15f3ac4604b48734 100644 ---- a/src/base_object-inl.h -+++ b/src/base_object-inl.h -@@ -127,7 +127,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 e0f1b2d51f3055b2250f2c0dc1dfd1048b645dd9..d2d9e06da8da068bb53f8d9a656e912d8b1fff3d 100644 ---- a/src/module_wrap.cc -+++ b/src/module_wrap.cc -@@ -77,7 +77,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(); - } -@@ -685,7 +685,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 4993da585322dbe9f4faec986ae36d4f215b35af..c0507777273cff6ef781dd9e09e1423e92a431aa 100644 ---- a/src/node_file.cc -+++ b/src/node_file.cc -@@ -439,7 +439,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 5d0e2b0d4c7ba16f920176ac42a33d70610f273e..1a0cb082a2534f17233d0557e95837b2ce79d43b 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 fac116f9e6b3e23451c812be0a123fe6368fb3df..0c4ae0fc794347be49502977d8a375ff1007a605 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 f1769ca52970fed7267fed4df29aee0803faa859..b9dfc645e2b49c73822fc7277f296d028699de05 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); - }