Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_contextify.cc')
-rw-r--r--src/node_contextify.cc12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/node_contextify.cc b/src/node_contextify.cc
index 0accd99c0c4..a0acdb75eed 100644
--- a/src/node_contextify.cc
+++ b/src/node_contextify.cc
@@ -1282,21 +1282,11 @@ void MicrotaskQueueWrap::New(const FunctionCallbackInfo<Value>& args) {
void MicrotaskQueueWrap::Init(Environment* env, Local<Object> target) {
HandleScope scope(env->isolate());
- Local<String> class_name =
- FIXED_ONE_BYTE_STRING(env->isolate(), "MicrotaskQueue");
-
Local<FunctionTemplate> tmpl = env->NewFunctionTemplate(New);
tmpl->InstanceTemplate()->SetInternalFieldCount(
ContextifyScript::kInternalFieldCount);
- tmpl->SetClassName(class_name);
-
- if (target->Set(env->context(),
- class_name,
- tmpl->GetFunction(env->context()).ToLocalChecked())
- .IsNothing()) {
- return;
- }
env->set_microtask_queue_ctor_template(tmpl);
+ env->SetConstructorFunction(target, "MicrotaskQueue", tmpl);
}