src: fix JSError inspection with stringified stack#291
Closed
mmarchini wants to merge 1 commit intonodejs:masterfrom
Closed
src: fix JSError inspection with stringified stack#291mmarchini wants to merge 1 commit intonodejs:masterfrom
mmarchini wants to merge 1 commit intonodejs:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #291 +/- ##
=========================================
- Coverage 79.75% 78.6% -1.16%
=========================================
Files 33 33
Lines 4219 4225 +6
=========================================
- Hits 3365 3321 -44
- Misses 854 904 +50
Continue to review full report at Codecov.
|
cjihrig
approved these changes
Sep 18, 2019
src/llv8.cc
Outdated
| : frame_array_(frame_array) { | ||
| if (!frame_array.Check()) { | ||
| Error::PrintInDebugMode( | ||
| "JS Array is not a valid object"); |
Contributor
There was a problem hiding this comment.
Do you think this message would be more helpful if it mentioned that the invalid JS array is an error stack?
Contributor
Author
There was a problem hiding this comment.
I thought about that, but I want to change our PrintInDebugMode to also print the function where it was called, so I decided to keep like this until I make that change.
b10efec to
f76d999
Compare
When the `stack` property of an Error object is accessed in V8, a stringified version of the stack is generated, and then the "raw stack" (with FP and arguments) is removed from memory. Our current inspection code couldn't handle this because it was not checking if the raw stack was a valid object. This commit makes that code more robust and thus fixes inspection of error objects with stringified stacks.
f76d999 to
d5f6b2d
Compare
mmarchini
added a commit
that referenced
this pull request
Sep 27, 2019
When the `stack` property of an Error object is accessed in V8, a stringified version of the stack is generated, and then the "raw stack" (with FP and arguments) is removed from memory. Our current inspection code couldn't handle this because it was not checking if the raw stack was a valid object. This commit makes that code more robust and thus fixes inspection of error objects with stringified stacks. PR-URL: #291 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Contributor
Author
|
Landed in fb25c91 |
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.
When the
stackproperty of an Error object is accessed in V8, astringified version of the stack is generated, and then the "raw stack"
(with FP and arguments) is removed from memory. Our current inspection
code couldn't handle this because it was not checking if the raw stack
was a valid object. This commit makes that code more robust and thus
fixes inspection of error objects with stringified stacks.