commit | 2d65e67305a7c39f1c157f497fde25f3d84d9153 | [log] [tgz] |
---|---|---|
author | Anna Henningsen <[email protected]> | Sun Sep 23 17:10:54 2018 |
committer | Anna Henningsen <[email protected]> | Tue Sep 25 22:32:12 2018 |
tree | e4276e326c18f018323a12351cb248c5ce35ff9c | |
parent | d102a85cd9d55342ec6ad46a274d24ae43c85ea5 [diff] [blame] |
worker: hide MessagePort init function behind symbol This reduces unintended exposure of internals. PR-URL: https://github.com/nodejs/node/pull/23037 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Michaƫl Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
diff --git a/src/node_messaging.cc b/src/node_messaging.cc index bb73445..6dd66f2 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc
@@ -421,7 +421,7 @@ async()->data = static_cast<void*>(this); Local<Value> fn; - if (!wrap->Get(context, env->oninit_string()).ToLocal(&fn)) + if (!wrap->Get(context, env->oninit_symbol()).ToLocal(&fn)) return; if (fn->IsFunction()) {