1 #ifndef SRC_NODE_PROCESS_H_ 2 #define SRC_NODE_PROCESS_H_ 3 4 #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 5 6 #include "v8.h" 7 8 namespace node { 9 10 v8::MaybeLocal<v8::Object> CreateEnvVarProxy(v8::Local<v8::Context> context, 11 v8::Isolate* isolate); 12 13 // Most of the time, it's best to use `console.error` to write 14 // to the process.stderr stream. However, in some cases, such as 15 // when debugging the stream.Writable class or the process.nextTick 16 // function, it is useful to bypass JavaScript entirely. 17 void RawDebug(const v8::FunctionCallbackInfo<v8::Value>& args); 18 19 v8::MaybeLocal<v8::Value> ProcessEmit(Environment* env, 20 const char* event, 21 v8::Local<v8::Value> message); 22 23 v8::Maybe<bool> ProcessEmitWarningGeneric(Environment* env, 24 const char* warning, 25 const char* type = nullptr, 26 const char* code = nullptr); 27 28 template <typename... Args> 29 inline v8::Maybe<bool> ProcessEmitWarning(Environment* env, 30 const char* fmt, 31 Args&&... args); 32 v8::Maybe<bool> ProcessEmitExperimentalWarning(Environment* env, 33 const char* warning); 34 v8::Maybe<bool> ProcessEmitDeprecationWarning(Environment* env, 35 const char* warning, 36 const char* deprecation_code); 37 38 v8::MaybeLocal<v8::Object> CreateProcessObject(Environment* env); 39 void PatchProcessObject(const v8::FunctionCallbackInfo<v8::Value>& args); 40 41 } // namespace node 42 #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 43 #endif // SRC_NODE_PROCESS_H_ 44