mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
src: inform callback scopes about exceptions in HTTP parser
Refs: https://github.com/nodejs/node/commit/4aca277f16b8649b5fc21d41f340fad0a47c2e61 Refs: https://github.com/nodejs/node/pull/30236 Fixes: https://github.com/nodejs/node/issues/31796 PR-URL: https://github.com/nodejs/node/pull/31801 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
This commit is contained in:
2 files changed
+31
No files matched your search
@@ -330,6 +330,7 @@ class Parser : public AsyncWrap, public StreamListener {
|
||||
this, InternalCallbackScope::kSkipTaskQueues);
|
||||
head_response = cb.As<Function>()->Call(
|
||||
env()->context(), object(), arraysize(argv), argv);
|
||||
if (head_response.IsEmpty()) callback_scope.MarkAsFailed();
|
||||
}
|
||||
|
||||
int64_t val;
|
||||
@@ -401,6 +402,7 @@ class Parser : public AsyncWrap, public StreamListener {
|
||||
InternalCallbackScope callback_scope(
|
||||
this, InternalCallbackScope::kSkipTaskQueues);
|
||||
r = cb.As<Function>()->Call(env()->context(), object(), 0, nullptr);
|
||||
if (r.IsEmpty()) callback_scope.MarkAsFailed();
|
||||
}
|
||||
|
||||
if (r.IsEmpty()) {
|
||||
|
||||
Reference in new issue
Block a user