@@ -29,7 +29,7 @@ using v8::Exception; |
29 | 29 | using v8::FunctionCallbackInfo; |
30 | 30 | using v8::HandleScope; |
31 | 31 | using v8::Isolate; |
32 | | -using v8::Just; |
| 32 | +using v8::JustVoid; |
33 | 33 | using v8::Local; |
34 | 34 | using v8::Maybe; |
35 | 35 | using v8::MaybeLocal; |
@@ -457,9 +457,10 @@ ByteSource ByteSource::Foreign(const void* data, size_t size) { |
457 | 457 | } |
458 | 458 |
|
459 | 459 | namespace error { |
460 | | -Maybe<bool> Decorate(Environment* env, Local<Object> obj, |
461 | | - unsigned long err) { // NOLINT(runtime/int) |
462 | | - if (err == 0) return Just(true); // No decoration necessary. |
| 460 | +Maybe<void> Decorate(Environment* env, |
| 461 | + Local<Object> obj, |
| 462 | + unsigned long err) { // NOLINT(runtime/int) |
| 463 | + if (err == 0) return JustVoid(); // No decoration necessary. |
463 | 464 |
|
464 | 465 | const char* ls = ERR_lib_error_string(err); |
465 | 466 | const char* fs = ERR_func_error_string(err); |
@@ -471,19 +472,19 @@ Maybe<bool> Decorate(Environment* env, Local<Object> obj, |
471 | 472 | if (ls != nullptr) { |
472 | 473 | if (obj->Set(context, env->library_string(), |
473 | 474 | OneByteString(isolate, ls)).IsNothing()) { |
474 | | - return Nothing<bool>(); |
| 475 | + return Nothing<void>(); |
475 | 476 | } |
476 | 477 | } |
477 | 478 | if (fs != nullptr) { |
478 | 479 | if (obj->Set(context, env->function_string(), |
479 | 480 | OneByteString(isolate, fs)).IsNothing()) { |
480 | | - return Nothing<bool>(); |
| 481 | + return Nothing<void>(); |
481 | 482 | } |
482 | 483 | } |
483 | 484 | if (rs != nullptr) { |
484 | 485 | if (obj->Set(context, env->reason_string(), |
485 | 486 | OneByteString(isolate, rs)).IsNothing()) { |
486 | | - return Nothing<bool>(); |
| 487 | + return Nothing<void>(); |
487 | 488 | } |
488 | 489 |
|
489 | 490 | // SSL has no API to recover the error name from the number, so we |
@@ -556,10 +557,10 @@ Maybe<bool> Decorate(Environment* env, Local<Object> obj, |
556 | 557 | if (obj->Set(env->isolate()->GetCurrentContext(), |
557 | 558 | env->code_string(), |
558 | 559 | OneByteString(env->isolate(), code)).IsNothing()) |
559 | | - return Nothing<bool>(); |
| 560 | + return Nothing<void>(); |
560 | 561 | } |
561 | 562 |
|
562 | | - return Just(true); |
| 563 | + return JustVoid(); |
563 | 564 | } |
564 | 565 | } // namespace error |
565 | 566 |
|
|