diff --git a/src/node.cc b/src/node.cc index 51bdc0df7c5d89..669155a908e2eb 100644 --- a/src/node.cc +++ b/src/node.cc @@ -4425,7 +4425,7 @@ void FreeEnvironment(Environment* env) { } -MultiIsolatePlatform* GetNodeMultiIsolatePlatform() { +MultiIsolatePlatform* GetMainThreadMultiIsolatePlatform() { return v8_platform.Platform(); } diff --git a/src/node.h b/src/node.h index 9019c80f18e3f8..ce5ef924f15507 100644 --- a/src/node.h +++ b/src/node.h @@ -251,9 +251,10 @@ NODE_EXTERN Environment* CreateEnvironment(IsolateData* isolate_data, NODE_EXTERN void LoadEnvironment(Environment* env); NODE_EXTERN void FreeEnvironment(Environment* env); -// This returns the MultiIsolatePlatform used by node main. -// If NODE_USE_V8_PLATFORM is not defined, it will return nullptr. -NODE_EXTERN MultiIsolatePlatform* GetNodeMultiIsolatePlatform(); +// This returns the MultiIsolatePlatform used in the main thread of Node.js. +// If NODE_USE_V8_PLATFORM haven't been defined when Node.js was built, +// it would return nullptr. +NODE_EXTERN MultiIsolatePlatform* GetMainThreadMultiIsolatePlatform(); NODE_EXTERN MultiIsolatePlatform* CreatePlatform( int thread_pool_size,