Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/async_wrap-inl.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/async_wrap-inl.h b/src/async_wrap-inl.h
index e3e48666e4f..03745081f3b 100644
--- a/src/async_wrap-inl.h
+++ b/src/async_wrap-inl.h
@@ -74,9 +74,8 @@ inline v8::MaybeLocal<v8::Value> AsyncWrap::MakeCallback(
if (!object()->Get(env()->context(), symbol).ToLocal(&cb_v))
return v8::MaybeLocal<v8::Value>();
if (!cb_v->IsFunction()) {
- // TODO(addaleax): We should throw an error here to fulfill the
- // `MaybeLocal<>` API contract.
- return v8::MaybeLocal<v8::Value>();
+ v8::Isolate* isolate = env()->isolate();
+ return Undefined(isolate);
}
return MakeCallback(cb_v.As<v8::Function>(), argc, argv);
}