Skip to content

Commit

Permalink
src: add public API to expose the MultiIsolatePlatform used in node m…
Browse files Browse the repository at this point in the history
…ain thread
  • Loading branch information
helloshuangzi committed May 1, 2018
1 parent e954aa0 commit 95b93f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4425,6 +4425,11 @@ void FreeEnvironment(Environment* env) {
}


MultiIsolatePlatform* GetNodeMultiIsolatePlatform() {
return v8_platform.Platform();
}


MultiIsolatePlatform* CreatePlatform(
int thread_pool_size,
v8::TracingController* tracing_controller) {
Expand Down
4 changes: 4 additions & 0 deletions src/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +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();

NODE_EXTERN MultiIsolatePlatform* CreatePlatform(
int thread_pool_size,
v8::TracingController* tracing_controller);
Expand Down

0 comments on commit 95b93f9

Please sign in to comment.