Update test and stack frame code to support newer V8 stack formats #22477
+63
−3
Conversation
…k frames for newer versions of v8
|
Comparing: 75b9869...dabc7fd Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
akgupta0777
reviewed
Oct 1, 2021
Seems good.
jstejada
approved these changes
Oct 11, 2021
looks good, thanks!
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.
Different versions of V8 use different Error message formats when script tries to read properties from
nullorundefined. Older versions use e.g. "Cannot read property 'foo' of undefined". Newer versions use e.g. "Cannot read properties of undefined (reading 'foo')".This PR overrides the built-in
toThrowmatches to detect which message format is used and match appropriately. (This enables our tests to pass on Node 12-16 without forking.)This PR also updates
describeNativeComponentFrame()to handle another different between engine versions. Specifically, we detect when a function component with adisplayNameis represented in the component stack as "<anonymous>" and sub in the display name accordingly.These could be split into separate PRs, but technically both are required for all tests to pass on Node 16, so...
To test this PR, I ran all tests using node 14.17.0 and 16.9.1.
Resolves #22441
The text was updated successfully, but these errors were encountered: