• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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                                              v8::Local<v8::Object> data);
13 
14 // Most of the time, it's best to use `console.error` to write
15 // to the process.stderr stream.  However, in some cases, such as
16 // when debugging the stream.Writable class or the process.nextTick
17 // function, it is useful to bypass JavaScript entirely.
18 void RawDebug(const v8::FunctionCallbackInfo<v8::Value>& args);
19 
20 v8::MaybeLocal<v8::Value> ProcessEmit(Environment* env,
21                                       const char* event,
22                                       v8::Local<v8::Value> message);
23 
24 v8::Maybe<bool> ProcessEmitWarningGeneric(Environment* env,
25                                           const char* warning,
26                                           const char* type = nullptr,
27                                           const char* code = nullptr);
28 
29 v8::Maybe<bool> ProcessEmitWarning(Environment* env, const char* fmt, ...);
30 v8::Maybe<bool> ProcessEmitExperimentalWarning(Environment* env,
31                                               const char* warning);
32 v8::Maybe<bool> ProcessEmitDeprecationWarning(Environment* env,
33                                               const char* warning,
34                                               const char* deprecation_code);
35 
36 v8::MaybeLocal<v8::Object> CreateProcessObject(Environment* env);
37 void PatchProcessObject(const v8::FunctionCallbackInfo<v8::Value>& args);
38 
39 }  // namespace node
40 #endif  // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
41 #endif  // SRC_NODE_PROCESS_H_
42