diff options
Diffstat (limited to 'src/node_worker.cc')
-rw-r--r-- | src/node_worker.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/node_worker.cc b/src/node_worker.cc index 7369e13768e..d163ec2461d 100644 --- a/src/node_worker.cc +++ b/src/node_worker.cc @@ -815,12 +815,7 @@ void InitWorker(Local<Object> target, env->SetProtoMethod(w, "loopIdleTime", Worker::LoopIdleTime); env->SetProtoMethod(w, "loopStartTime", Worker::LoopStartTime); - Local<String> workerString = - FIXED_ONE_BYTE_STRING(env->isolate(), "Worker"); - w->SetClassName(workerString); - target->Set(env->context(), - workerString, - w->GetFunction(env->context()).ToLocalChecked()).Check(); + env->SetConstructorFunction(target, "Worker", w); } { |