diff --git a/src/api/callback.cc b/src/api/callback.cc index 885134799fe019..4bcccb960c5556 100644 --- a/src/api/callback.cc +++ b/src/api/callback.cc @@ -139,6 +139,11 @@ MaybeLocal InternalMakeCallback(Environment* env, Local argv[], async_context asyncContext) { CHECK(!recv.IsEmpty()); +#ifdef DEBUG + for (int i = 0; i < argc; i++) + CHECK(!argv[i].IsEmpty()); +#endif + InternalCallbackScope scope(env, recv, asyncContext); if (scope.Failed()) { return MaybeLocal(); diff --git a/src/node_errors.cc b/src/node_errors.cc index 42e19f690514ff..39673abf7f0e41 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -710,6 +710,7 @@ void DecorateErrorStack(Environment* env, void FatalException(Isolate* isolate, Local error, Local message) { + CHECK(!error.IsEmpty()); HandleScope scope(isolate); Environment* env = Environment::GetCurrent(isolate);