-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node.js v12 + master support #318
Closed
Closed
Conversation
This file contains 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
If a test case would use Promises for linesUntil, sometimes we would emit lines events while there was no listener attached to it. This commit changes SessionOutput to make it a little more resilient: now line events will only be emitted when the SessionOutput is waiting. When wait is called (via linesUntil, for example), it'll retrieve all lines (via line events) on the buffer until it reaches a line matching the regexp. If no lines match the regexp, we'll continue as before waiting for data from lldb and buffering it.
Apparently, sometimes the FunctionName slot on ScopeInfo is filled with the empty string instead of not existing. This commit changes our heuristic to search for the first non-empty string on the first 3 slots after the last context info slot on the ScopeInfo. This should be enough to cover most (all?) cases. Also updated frame-test to add frames to the stack which V8 will infer the name instead of storing it directly, and changed this particular test to use Promises instead of callbacks. We should be able to upgrade tests to primise-based API gradually with this approach. When all tests are promisified, we can change the api on test/common.js to be promise-based instead of callback-based.
a501635 changed the behavior of Check() so that it could be properly used to determine if an object was loaded successfully from memory. In the past we used raw != -1 to perform the same check. Some places were still using the old approach, which has less guarantees than Check(). This commit changes those places to use the new approach. Also added a few RETURN_IF_THIS_INVALID guards on the functions touched by this commit.
Same idea as CheckedType: instead of relying on the default value for constants to determine if they were loaded correctly or not (default value usually was -1), have a class which will have information about the loaded constant. This can help us: - Check if a constant was properly loaded before using it (otherwise we'd get into undefined behavior, and there are a lot of places where this happens. - Check if a constant value was loaded or if we're looking at the default value. - Explicitly define a constant as optional (constants which are not relevant except for specific V8 versions). This will help us improve reliability and debugability of llnode.
V8 7.5 changed how it caches the stringified stack on Error objects after the first access. Instead of replacing the accessor Error.stack with the stringified stack, the stringified stack is stored in the same Symbol which was used to store the FrameArray stack. Ref: v8/v8@c820604
Codecov Report
@@ Coverage Diff @@
## master #318 +/- ##
==========================================
- Coverage 79.02% 78.89% -0.13%
==========================================
Files 33 33
Lines 4247 4388 +141
==========================================
+ Hits 3356 3462 +106
- Misses 891 926 +35
Continue to review full report at Codecov.
|
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.
Just opening the PR to share the working version of v12.x (and master) fixes. I still have to clean up several of those commits (and rewrite their commit messages) and the idea is to open them as separate PRs. IIRC they do not depend on each other (but several depend on #303, which is why I haven't opened their PRs yet).
It's also worth noting that v12 won't work without https://chromium-review.googlesource.com/c/v8/v8/+/1847783 and https://chromium-review.googlesource.com/c/v8/v8/+/1832311.