Skip to content

Commit

Permalink
src: add public API to get current node platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi committed Jan 4, 2018
1 parent 11a1bc1 commit dc1e228
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4395,6 +4395,9 @@ void FreePlatform(MultiIsolatePlatform* platform) {
delete platform;
}

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

Local<Context> NewContext(Isolate* isolate,
Local<ObjectTemplate> object_template) {
Expand Down
2 changes: 2 additions & 0 deletions src/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ NODE_EXTERN MultiIsolatePlatform* CreatePlatform(
v8::TracingController* tracing_controller);
NODE_EXTERN void FreePlatform(MultiIsolatePlatform* platform);

NODE_EXTERN MultiIsolatePlatform* GetCurrentPlatform();

NODE_EXTERN void EmitBeforeExit(Environment* env);
NODE_EXTERN int EmitExit(Environment* env);
NODE_EXTERN void RunAtExit(Environment* env);
Expand Down

0 comments on commit dc1e228

Please sign in to comment.