src: handle TryCatch with empty message#20708
Closed
bnoordhuis wants to merge 1 commit intonodejs:masterfrom
Closed
src: handle TryCatch with empty message#20708bnoordhuis wants to merge 1 commit intonodejs:masterfrom
bnoordhuis wants to merge 1 commit intonodejs:masterfrom
Conversation
addaleax
approved these changes
May 13, 2018
Trott
reviewed
May 13, 2018
Member
There was a problem hiding this comment.
I'm sorry if I'm being dense, but can you explain what you mean by this comment? I'm not sure what you mean exactly by "becomes invalidated". Does that mean "becomes unnecessary" in this context? Or maybe it means "stops working"? Or something else?
Member
Author
There was a problem hiding this comment.
Unnecessary, yes, as in "no longer tests this particular condition because node's internals changed."
Member
There was a problem hiding this comment.
Ah, literally invalidated like you wrote initially, just I was thinking about it wrong. I get it now. Thanks.
This bug needs a test case with a high goldilocks factor to trigger but the synopsis is that `v8::TryCatch::Message()` returns an empty handle when the TryCatch is declared at a time when an exception is already pending. We now recompute the message inside `node::ReportException()` and all is well again. Fixes: nodejs#8854
apapirovski
approved these changes
May 14, 2018
jasnell
approved these changes
May 14, 2018
cjihrig
approved these changes
May 14, 2018
danbev
approved these changes
May 15, 2018
Contributor
|
Landed in de4e0d7 |
apapirovski
pushed a commit
that referenced
this pull request
May 16, 2018
This bug needs a test case with a high goldilocks factor to trigger but the synopsis is that `v8::TryCatch::Message()` returns an empty handle when the TryCatch is declared at a time when an exception is already pending. We now recompute the message inside `node::ReportException()` and all is well again. PR-URL: #20708 Fixes: #8854 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
May 22, 2018
This bug needs a test case with a high goldilocks factor to trigger but the synopsis is that `v8::TryCatch::Message()` returns an empty handle when the TryCatch is declared at a time when an exception is already pending. We now recompute the message inside `node::ReportException()` and all is well again. PR-URL: #20708 Fixes: #8854 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Merged
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This bug needs a test case with a high goldilocks factor to trigger
but the synopsis is that
v8::TryCatch::Message()returns an emptyhandle when the TryCatch is declared at a time when an exception is
already pending.
We now recompute the message inside
node::ReportException()andall is well again.
Fixes: #8854
CI:
https://ci.nodejs.org/job/node-test-pull-request/14850/CI:
https://ci.nodejs.org/job/node-test-pull-request/14851/CI: https://ci.nodejs.org/job/node-test-pull-request/14861/ (minor test tweaks)