From 62352ee364d418645686f444b84c481fd55a1581 Mon Sep 17 00:00:00 2001 From: GuangWong Date: Tue, 3 Jan 2023 14:41:12 +0800 Subject: [PATCH] src: adjust property helpers usage --- deps/strontium/src/pgo/require-cache.cc | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/deps/strontium/src/pgo/require-cache.cc b/deps/strontium/src/pgo/require-cache.cc index b1c71626205..bdd7b2285ad 100644 --- a/deps/strontium/src/pgo/require-cache.cc +++ b/deps/strontium/src/pgo/require-cache.cc @@ -46,23 +46,25 @@ RequireCacheWrap::~RequireCacheWrap() { void RequireCacheWrap::Initialize(Environment* env, Local target) { HandleScope scope(env->isolate()); - Local t = env->NewFunctionTemplate(New); + Isolate* isolate = env->isolate(); + + Local t = node::NewFunctionTemplate(isolate, New); t->InstanceTemplate()->SetInternalFieldCount( RequireCacheWrap::kInternalFieldCount); - env->SetProtoMethod(t, "isLoaded", IsLoaded); + node::SetProtoMethod(isolate, t, "isLoaded", IsLoaded); - env->SetProtoMethod(t, "addRelation", AddRelation); - env->SetProtoMethod(t, "addCode", AddCode); - env->SetProtoMethod(t, "dump", Dump); + node::SetProtoMethod(isolate, t, "addRelation", AddRelation); + node::SetProtoMethod(isolate, t, "addCode", AddCode); + node::SetProtoMethod(isolate, t, "dump", Dump); - env->SetProtoMethod(t, "queryCode", QueryCode); - env->SetProtoMethod(t, "queryRelation", QueryRelation); - env->SetProtoMethod(t, "getInternalMeta", GetInternalMeta); + node::SetProtoMethod(isolate, t, "queryCode", QueryCode); + node::SetProtoMethod(isolate, t, "queryRelation", QueryRelation); + node::SetProtoMethod(isolate, t, "getInternalMeta", GetInternalMeta); - env->SetProtoMethod(t, "transformFilename", TransformFilename); - env->SetProtoMethod(t, "transformFilenameBack", TransformFilenameBack); + node::SetProtoMethod(isolate, t, "transformFilename", TransformFilename); + node::SetProtoMethod(isolate, t, "transformFilenameBack", TransformFilenameBack); target ->Set(env->context(),