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()) {