From c92af0b8862f98c26d8c8808694d928a4c13fd61 Mon Sep 17 00:00:00 2001 From: Allen Yonghuang Wang Date: Tue, 1 May 2018 10:21:05 -0700 Subject: [PATCH] src: give it a more accurate name and polish its comments. --- src/node.cc | 2 +- src/node.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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,