diff --git a/lib/internal/worker.js b/lib/internal/worker.js index 5dcb1978b5..6a3d6755f5 100644 --- a/lib/internal/worker.js +++ b/lib/internal/worker.js @@ -8,7 +8,7 @@ util.inherits(MessagePort, EventEmitter); const debug = util.debuglog('worker'); -// A MessagePort consists a handle (that wraps around an +// A MessagePort consists of a handle (that wraps around an // uv_async_t) which can receive information from other threads and emits // .onmessage events, and a function used for sending data to a MessagePort // in some other thread. @@ -22,7 +22,7 @@ function onmessage(payload, flag) { } Object.defineProperty(MessagePort.prototype, 'onmessage', { - enumerable: false, + enumerable: true, configurable: true, get() { return onmessage; }, set(value) { @@ -42,7 +42,7 @@ function oninit() { } Object.defineProperty(MessagePort.prototype, 'oninit', { - enumerable: false, + enumerable: true, writable: false, value: oninit }); @@ -52,7 +52,7 @@ function onclose() { } Object.defineProperty(MessagePort.prototype, 'onclose', { - enumerable: false, + enumerable: true, writable: false, value: onclose }); diff --git a/src/env.h b/src/env.h index 5a9d7c035e..912301a75f 100644 --- a/src/env.h +++ b/src/env.h @@ -323,7 +323,6 @@ class ModuleWrap; V(promise_wrap_template, v8::ObjectTemplate) \ V(push_values_to_array_function, v8::Function) \ V(randombytes_constructor_template, v8::ObjectTemplate) \ - V(sab_lifetimepartner_constructor_template, v8::FunctionTemplate) \ V(script_context_constructor_template, v8::FunctionTemplate) \ V(script_data_constructor_function, v8::Function) \ V(secure_context_constructor_template, v8::FunctionTemplate) \ diff --git a/src/node_messaging.cc b/src/node_messaging.cc index a5e1b1476b..850396ad92 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc @@ -519,8 +519,7 @@ MaybeLocal GetMessagePortConstructor( Environment* env, Local context) { // Factor generating the MessagePort JS constructor into its own piece // of code, because it is needed early on in the child environment setup. - Local templ; - templ = env->message_port_constructor_template(); + Local templ = env->message_port_constructor_template(); if (!templ.IsEmpty()) return templ->GetFunction(context);