Skip to content

Commit 0824ea9

Browse files
danbevtargos
authored andcommitted
src: use unqualified names in module_wrap.cc
This commit removes the usage of qualified names for consistency. PR-URL: #20594 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 7c13e54 commit 0824ea9

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/module_wrap.cc

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,7 @@ void ModuleWrap::Instantiate(const FunctionCallbackInfo<Value>& args) {
224224
Local<Context> context = obj->context_.Get(isolate);
225225
Local<Module> module = obj->module_.Get(isolate);
226226
TryCatch try_catch(isolate);
227-
Maybe<bool> ok =
228-
module->InstantiateModule(context, ModuleWrap::ResolveCallback);
227+
Maybe<bool> ok = module->InstantiateModule(context, ResolveCallback);
229228

230229
// clear resolve cache on instantiate
231230
obj->resolve_cache_.clear();
@@ -369,7 +368,7 @@ MaybeLocal<Module> ModuleWrap::ResolveCallback(Local<Context> context,
369368
return MaybeLocal<Module>();
370369
}
371370

372-
ModuleWrap* dependent = ModuleWrap::GetFromModule(env, referrer);
371+
ModuleWrap* dependent = GetFromModule(env, referrer);
373372

374373
if (dependent == nullptr) {
375374
env->ThrowError("linking error, null dep");
@@ -749,7 +748,7 @@ void ModuleWrap::HostInitializeImportMetaObjectCallback(
749748
Local<Context> context, Local<Module> module, Local<Object> meta) {
750749
Isolate* isolate = context->GetIsolate();
751750
Environment* env = Environment::GetCurrent(context);
752-
ModuleWrap* module_wrap = ModuleWrap::GetFromModule(env, module);
751+
ModuleWrap* module_wrap = GetFromModule(env, module);
753752

754753
if (module_wrap == nullptr) {
755754
return;
@@ -797,13 +796,13 @@ void ModuleWrap::Initialize(Local<Object> target,
797796
GetStaticDependencySpecifiers);
798797

799798
target->Set(FIXED_ONE_BYTE_STRING(isolate, "ModuleWrap"), tpl->GetFunction());
800-
env->SetMethod(target, "resolve", node::loader::ModuleWrap::Resolve);
799+
env->SetMethod(target, "resolve", Resolve);
801800
env->SetMethod(target,
802801
"setImportModuleDynamicallyCallback",
803-
node::loader::ModuleWrap::SetImportModuleDynamicallyCallback);
802+
SetImportModuleDynamicallyCallback);
804803
env->SetMethod(target,
805804
"setInitializeImportMetaObjectCallback",
806-
ModuleWrap::SetInitializeImportMetaObjectCallback);
805+
SetInitializeImportMetaObjectCallback);
807806

808807
#define V(name) \
809808
target->Set(context, \

0 commit comments

Comments
 (0)