Skip to content

Commit

Permalink
src: use unqualified names in module_wrap.cc
Browse files Browse the repository at this point in the history
This commit removes the usage of qualified names for consistency.

PR-URL: #20594
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
danbev authored and targos committed May 12, 2018
1 parent 7c13e54 commit 0824ea9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/module_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ void ModuleWrap::Instantiate(const FunctionCallbackInfo<Value>& args) {
Local<Context> context = obj->context_.Get(isolate);
Local<Module> module = obj->module_.Get(isolate);
TryCatch try_catch(isolate);
Maybe<bool> ok =
module->InstantiateModule(context, ModuleWrap::ResolveCallback);
Maybe<bool> ok = module->InstantiateModule(context, ResolveCallback);

// clear resolve cache on instantiate
obj->resolve_cache_.clear();
Expand Down Expand Up @@ -369,7 +368,7 @@ MaybeLocal<Module> ModuleWrap::ResolveCallback(Local<Context> context,
return MaybeLocal<Module>();
}

ModuleWrap* dependent = ModuleWrap::GetFromModule(env, referrer);
ModuleWrap* dependent = GetFromModule(env, referrer);

if (dependent == nullptr) {
env->ThrowError("linking error, null dep");
Expand Down Expand Up @@ -749,7 +748,7 @@ void ModuleWrap::HostInitializeImportMetaObjectCallback(
Local<Context> context, Local<Module> module, Local<Object> 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;
Expand Down Expand Up @@ -797,13 +796,13 @@ void ModuleWrap::Initialize(Local<Object> 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, \
Expand Down

0 comments on commit 0824ea9

Please sign in to comment.