diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2018-12-31 23:18:08 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-01-11 20:11:55 +0800 |
commit | 7824280b5827e1aaba067088b195328185525b21 (patch) | |
tree | 7c1971d1ee5ac4a6f02b38e8fb6bfebf5a02c250 /src/node_process.h | |
parent | 5a15f4bdfa060082757062dc5f39519d93e7b8fb (diff) | |
download | android-node-v8-7824280b5827e1aaba067088b195328185525b21.tar.gz android-node-v8-7824280b5827e1aaba067088b195328185525b21.tar.bz2 android-node-v8-7824280b5827e1aaba067088b195328185525b21.zip |
src: declare process-related C++ methods in node_process.h
Instead of in node_internals.h. Also move process property
accessors that are not reused into node_process_object.cc
and make them static.
PR-URL: https://github.com/nodejs/node/pull/25397
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/node_process.h')
-rw-r--r-- | src/node_process.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/node_process.h b/src/node_process.h new file mode 100644 index 0000000000..35667ca1b9 --- /dev/null +++ b/src/node_process.h @@ -0,0 +1,32 @@ +#ifndef SRC_NODE_PROCESS_H_ +#define SRC_NODE_PROCESS_H_ + +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + +#include "v8.h" + +namespace node { + +v8::Local<v8::Object> CreateEnvVarProxy(v8::Local<v8::Context> context, + v8::Isolate* isolate, + v8::Local<v8::Value> data); + +// Most of the time, it's best to use `console.error` to write +// to the process.stderr stream. However, in some cases, such as +// when debugging the stream.Writable class or the process.nextTick +// function, it is useful to bypass JavaScript entirely. +void RawDebug(const v8::FunctionCallbackInfo<v8::Value>& args); + +v8::Maybe<bool> ProcessEmitWarning(Environment* env, const char* fmt, ...); +v8::Maybe<bool> ProcessEmitDeprecationWarning(Environment* env, + const char* warning, + const char* deprecation_code); + +v8::Local<v8::Object> CreateProcessObject( + Environment* env, + const std::vector<std::string>& args, + const std::vector<std::string>& exec_args); + +} // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS +#endif // SRC_NODE_PROCESS_H_ |