Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/node_process.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ inline v8::Maybe<bool> ProcessEmitWarning(Environment* env,
const char* fmt,
Args&&... args);

v8::Maybe<bool> ProcessEmitWarningSync(Environment* env,
v8::Maybe<void> ProcessEmitWarningSync(Environment* env,
std::string_view message);
v8::Maybe<bool> ProcessEmitExperimentalWarning(Environment* env,
const std::string& warning);
Expand Down
9 changes: 5 additions & 4 deletions src/node_process_events.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ using v8::Function;
using v8::HandleScope;
using v8::Isolate;
using v8::Just;
using v8::JustVoid;
using v8::Local;
using v8::Maybe;
using v8::MaybeLocal;
Expand All @@ -19,7 +20,7 @@ using v8::Object;
using v8::String;
using v8::Value;

Maybe<bool> ProcessEmitWarningSync(Environment* env, std::string_view message) {
Maybe<void> ProcessEmitWarningSync(Environment* env, std::string_view message) {
Isolate* isolate = env->isolate();
Local<Context> context = env->context();
Local<String> message_string;
Expand All @@ -28,7 +29,7 @@ Maybe<bool> ProcessEmitWarningSync(Environment* env, std::string_view message) {
NewStringType::kNormal,
static_cast<int>(message.size()))
.ToLocal(&message_string)) {
return Nothing<bool>();
return Nothing<void>();
}

Local<Value> argv[] = {message_string};
Expand All @@ -39,9 +40,9 @@ Maybe<bool> ProcessEmitWarningSync(Environment* env, std::string_view message) {
if (emit_function.As<Function>()
->Call(context, v8::Undefined(isolate), arraysize(argv), argv)
.IsEmpty()) {
return Nothing<bool>();
return Nothing<void>();
}
return Just(true);
return JustVoid();
}

MaybeLocal<Value> ProcessEmit(Environment* env,
Expand Down
Loading