-
-
Notifications
You must be signed in to change notification settings - Fork 101
src: fix function name lookup for inferred names #311
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
Conversation
|
I wonder if the failing tests are happening because I changed the test to use Primises... llnode is printing |
fb87eec to
c547181
Compare
| let fnInferredName; | ||
| fnInferredName = (() => function () { | ||
| crasher(); // # args < # formal parameters inserts an adaptor frame. | ||
| })(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
V8 is not inferring this on Node.js v12... We'll probably need to skip the check for this function on 12.
Upstream bug: https://bugs.chromium.org/p/v8/issues/detail?id=9807
|
cc @nodejs/llnode |
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.
c547181 to
67e6e32
Compare
Codecov Report
@@ Coverage Diff @@
## master #311 +/- ##
==========================================
+ Coverage 78.29% 78.96% +0.66%
==========================================
Files 33 33
Lines 4262 4278 +16
==========================================
+ Hits 3337 3378 +41
+ Misses 925 900 -25
Continue to review full report at Codecov.
|
|
cc @nodejs/llnode |
|
Ping @nodejs/llnode, we need this for v12 support. |
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. PR-URL: #311 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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. PR-URL: #311 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
Landed in fd9d2b0...8068cda |
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.