From 5d3c0bb083599dcab074f7db97e2ed54ecd3c463 Mon Sep 17 00:00:00 2001 From: RedYetiDev <38299977+RedYetiDev@users.noreply.github.com> Date: Fri, 18 Oct 2024 19:21:39 -0400 Subject: [PATCH] fixup! src: switch from `Get/SetPrototype` to `Get/SetPrototypeV2` --- src/node_constants.cc | 39 ++++++++++++++++++++------------------- src/node_options.cc | 6 ++++-- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/node_constants.cc b/src/node_constants.cc index 662bfdd4a8f8da..41465f627118cd 100644 --- a/src/node_constants.cc +++ b/src/node_constants.cc @@ -1285,43 +1285,44 @@ void CreatePerContextProperties(Local target, Isolate* isolate = context->GetIsolate(); Environment* env = Environment::GetCurrent(context); - CHECK(target->SetPrototypeV2(env->context(), Null(env->isolate())).FromJust()); + CHECK( + target->SetPrototypeV2(env->context(), Null(env->isolate())).FromJust()); Local os_constants = Object::New(isolate); - CHECK(os_constants->SetPrototypeV2(env->context(), - Null(env->isolate())).FromJust()); + CHECK(os_constants->SetPrototypeV2(env->context(), Null(env->isolate())) + .FromJust()); Local err_constants = Object::New(isolate); - CHECK(err_constants->SetPrototypeV2(env->context(), - Null(env->isolate())).FromJust()); + CHECK(err_constants->SetPrototypeV2(env->context(), Null(env->isolate())) + .FromJust()); Local sig_constants = Object::New(isolate); - CHECK(sig_constants->SetPrototypeV2(env->context(), - Null(env->isolate())).FromJust()); + CHECK(sig_constants->SetPrototypeV2(env->context(), Null(env->isolate())) + .FromJust()); Local priority_constants = Object::New(isolate); - CHECK(priority_constants->SetPrototypeV2(env->context(), - Null(env->isolate())).FromJust()); + CHECK(priority_constants->SetPrototypeV2(env->context(), Null(env->isolate())) + .FromJust()); Local fs_constants = Object::New(isolate); - CHECK(fs_constants->SetPrototypeV2(env->context(), - Null(env->isolate())).FromJust()); + CHECK(fs_constants->SetPrototypeV2(env->context(), Null(env->isolate())) + .FromJust()); Local crypto_constants = Object::New(isolate); - CHECK(crypto_constants->SetPrototypeV2(env->context(), - Null(env->isolate())).FromJust()); + CHECK(crypto_constants->SetPrototypeV2(env->context(), Null(env->isolate())) + .FromJust()); Local zlib_constants = Object::New(isolate); - CHECK(zlib_constants->SetPrototypeV2(env->context(), - Null(env->isolate())).FromJust()); + CHECK(zlib_constants->SetPrototypeV2(env->context(), Null(env->isolate())) + .FromJust()); Local dlopen_constants = Object::New(isolate); - CHECK(dlopen_constants->SetPrototypeV2(env->context(), - Null(env->isolate())).FromJust()); + CHECK(dlopen_constants->SetPrototypeV2(env->context(), Null(env->isolate())) + .FromJust()); Local trace_constants = Object::New(isolate); - CHECK(trace_constants->SetPrototypeV2(env->context(), - Null(env->isolate())).FromJust()); + CHECK(trace_constants->SetPrototypeV2(env->context(), Null(env->isolate())) + .FromJust()); DefineErrnoConstants(err_constants); DefineWindowsErrorConstants(err_constants); diff --git a/src/node_options.cc b/src/node_options.cc index c871cc66dc31b7..6783299a2d4b5e 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -1391,7 +1391,8 @@ void GetCLIOptionsInfo(const FunctionCallbackInfo& args) { Local options = Map::New(isolate); if (options - ->SetPrototypeV2(context, env->primordials_safe_map_prototype_object()) + ->SetPrototypeV2(context, + env->primordials_safe_map_prototype_object()) .IsNothing()) { return; } @@ -1431,7 +1432,8 @@ void GetCLIOptionsInfo(const FunctionCallbackInfo& args) { if (!ToV8Value(context, _ppop_instance.aliases_).ToLocal(&aliases)) return; if (aliases.As() - ->SetPrototypeV2(context, env->primordials_safe_map_prototype_object()) + ->SetPrototypeV2(context, + env->primordials_safe_map_prototype_object()) .IsNothing()) { return; }