summaryrefslogtreecommitdiff
path: root/src/node_process.h
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2018-12-31 22:59:40 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2019-01-11 20:11:56 +0800
commit84f0581d36bddbf7083e82c082275ef562fa8568 (patch)
tree7d19ecbc9a6a15ba676626fa009c79ac20d656fb /src/node_process.h
parent7824280b5827e1aaba067088b195328185525b21 (diff)
downloadnode-new-84f0581d36bddbf7083e82c082275ef562fa8568.tar.gz
process: move C++ process events into node_process_events.cc
Move the C++ `process.emit` and `process.emitWarning` methods from `node.cc` into into `node_process_events.cc`, and reuse the implementation in other places that need to do `process.emit` in C++. 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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/node_process.h b/src/node_process.h
index 35667ca1b9..865223c163 100644
--- a/src/node_process.h
+++ b/src/node_process.h
@@ -17,6 +17,15 @@ v8::Local<v8::Object> CreateEnvVarProxy(v8::Local<v8::Context> context,
// function, it is useful to bypass JavaScript entirely.
void RawDebug(const v8::FunctionCallbackInfo<v8::Value>& args);
+v8::MaybeLocal<v8::Value> ProcessEmit(Environment* env,
+ const char* event,
+ v8::Local<v8::Value> message);
+
+v8::Maybe<bool> ProcessEmitWarningGeneric(Environment* env,
+ const char* warning,
+ const char* type = nullptr,
+ const char* code = nullptr);
+
v8::Maybe<bool> ProcessEmitWarning(Environment* env, const char* fmt, ...);
v8::Maybe<bool> ProcessEmitDeprecationWarning(Environment* env,
const char* warning,