src: add API to get MultiIsolatePlatform used in node main thread
This is used to support multi-thread JavaScript by node addon as below. A node addon can be created to initialize v8 Isolates in separate threads, which is used to run JavaScript in multi-thread. It requires the MultiIsolatePlatform (used in the node main thread) to register those isolates respectively.
As an example you may concern, when we try to re-implement napajs Worker::WorkerThreadFunc by node public APIs, it seems node::GetNodeMultiIsolatePlatform is a missing piece from node API.
#20239 (closed) is also an issue about this topic. @fs-eire
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines