From 0824ea9d7b71dbcd7ae0dbbdc87fd0db0f629b6a Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 8 May 2018 13:04:09 +0200 Subject: [PATCH] src: use unqualified names in module_wrap.cc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes the usage of qualified names for consistency. PR-URL: https://github.com/nodejs/node/pull/20594 Reviewed-By: Gus Caplan Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Anna Henningsen Reviewed-By: Tobias Nießen --- src/module_wrap.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/module_wrap.cc b/src/module_wrap.cc index fcccbfe93cea32..060d0db7c7fffe 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -224,8 +224,7 @@ void ModuleWrap::Instantiate(const FunctionCallbackInfo& args) { Local context = obj->context_.Get(isolate); Local module = obj->module_.Get(isolate); TryCatch try_catch(isolate); - Maybe ok = - module->InstantiateModule(context, ModuleWrap::ResolveCallback); + Maybe ok = module->InstantiateModule(context, ResolveCallback); // clear resolve cache on instantiate obj->resolve_cache_.clear(); @@ -369,7 +368,7 @@ MaybeLocal ModuleWrap::ResolveCallback(Local context, return MaybeLocal(); } - ModuleWrap* dependent = ModuleWrap::GetFromModule(env, referrer); + ModuleWrap* dependent = GetFromModule(env, referrer); if (dependent == nullptr) { env->ThrowError("linking error, null dep"); @@ -749,7 +748,7 @@ void ModuleWrap::HostInitializeImportMetaObjectCallback( Local context, Local module, Local meta) { Isolate* isolate = context->GetIsolate(); Environment* env = Environment::GetCurrent(context); - ModuleWrap* module_wrap = ModuleWrap::GetFromModule(env, module); + ModuleWrap* module_wrap = GetFromModule(env, module); if (module_wrap == nullptr) { return; @@ -797,13 +796,13 @@ void ModuleWrap::Initialize(Local target, GetStaticDependencySpecifiers); target->Set(FIXED_ONE_BYTE_STRING(isolate, "ModuleWrap"), tpl->GetFunction()); - env->SetMethod(target, "resolve", node::loader::ModuleWrap::Resolve); + env->SetMethod(target, "resolve", Resolve); env->SetMethod(target, "setImportModuleDynamicallyCallback", - node::loader::ModuleWrap::SetImportModuleDynamicallyCallback); + SetImportModuleDynamicallyCallback); env->SetMethod(target, "setInitializeImportMetaObjectCallback", - ModuleWrap::SetInitializeImportMetaObjectCallback); + SetInitializeImportMetaObjectCallback); #define V(name) \ target->Set(context, \