summaryrefslogtreecommitdiff
path: root/src/node_internals.h
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2018-12-19 09:53:12 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2018-12-21 16:33:09 +0800
commit75d0a9335f2f9bab72cdcbe9297d5617133a1d9c (patch)
treea6ad676cc33bead265fb78cbeaef13accf61f7cc /src/node_internals.h
parent4884ca6428c0069468beea0826d228e167ad9cea (diff)
downloadandroid-node-v8-75d0a9335f2f9bab72cdcbe9297d5617133a1d9c.tar.gz
android-node-v8-75d0a9335f2f9bab72cdcbe9297d5617133a1d9c.tar.bz2
android-node-v8-75d0a9335f2f9bab72cdcbe9297d5617133a1d9c.zip
src: move more process methods initialization in bootstrap/node.js
Instead of: - Writing methods onto the process directly in C++ during `SetupProcessObject()` and overwrite with argument checks later - Or, wrapping and writing them in `internal/process/*.js` Do: - Move the C++ implementations in node_process.cc and mark them static wherever possible - Expose the C++ methods through a new `internalBinding('process_methods')` - Wrap the methods in `internal/process/*.js` in a side-effect-free manner and return them back to `internal/bootstrap/node.js` - Centralize the write to the process object based on conditions in `bootstrap/node.js` So it's easier to see what methods are attached to the process object during bootstrap under what condition and in what order. The eventual goal is to figure out the dependency of process methods and the write/read access to the process object during bootstrap, group these access properly and remove the process properties that should not be exposed to users this way. Also correct the NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE milestone which should be marked before code execution. Refs: https://github.com/nodejs/node/issues/24961 PR-URL: https://github.com/nodejs/node/pull/25127 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_internals.h')
-rw-r--r--src/node_internals.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/node_internals.h b/src/node_internals.h
index 03017fb4f5..99498a6218 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -119,6 +119,7 @@ void GetSockOrPeerName(const v8::FunctionCallbackInfo<v8::Value>& args) {
args.GetReturnValue().Set(err);
}
+void Exit(const v8::FunctionCallbackInfo<v8::Value>& args);
void SignalExit(int signo);
#ifdef __POSIX__
void RegisterSignalHandler(int signal,
@@ -698,21 +699,7 @@ static inline const char* errno_string(int errorno) {
extern double prog_start_time;
-void Abort(const v8::FunctionCallbackInfo<v8::Value>& args);
-void Chdir(const v8::FunctionCallbackInfo<v8::Value>& args);
-void CPUUsage(const v8::FunctionCallbackInfo<v8::Value>& args);
-void Cwd(const v8::FunctionCallbackInfo<v8::Value>& args);
-void GetActiveHandles(const v8::FunctionCallbackInfo<v8::Value>& args);
-void GetActiveRequests(const v8::FunctionCallbackInfo<v8::Value>& args);
-void Hrtime(const v8::FunctionCallbackInfo<v8::Value>& args);
-void HrtimeBigInt(const v8::FunctionCallbackInfo<v8::Value>& args);
-void Kill(const v8::FunctionCallbackInfo<v8::Value>& args);
-void MemoryUsage(const v8::FunctionCallbackInfo<v8::Value>& args);
void RawDebug(const v8::FunctionCallbackInfo<v8::Value>& args);
-void StartProfilerIdleNotifier(const v8::FunctionCallbackInfo<v8::Value>& args);
-void StopProfilerIdleNotifier(const v8::FunctionCallbackInfo<v8::Value>& args);
-void Umask(const v8::FunctionCallbackInfo<v8::Value>& args);
-void Uptime(const v8::FunctionCallbackInfo<v8::Value>& args);
void DebugPortGetter(v8::Local<v8::Name> property,
const v8::PropertyCallbackInfo<v8::Value>& info);