test: workaround for V8 8.1 inspector pause issue #66
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.
test-inspector-multisession-ws
andtest-inspector-break-when-eval
will be affected by an upstream bug when we upgrade V8 to 8.1. The bug
is caused when the Inspector sets a pause at the start of a function
compiled with
CompileFunctionInContext
, but that function hasn't beenexecuted yet.
On both tests, this issue is triggered by pausing while in C++ executing
LookupAndCompile, which is called by requiring internal modules while
running
console.log
. To eliminate this issue in both tests, we add anextra
console.log
to ensure we only pause we required all internalmodules we need. On
test-inspector-break-when-eval
, we also need tostart the child process with
--inspect-brk
instead of--inspect
toensure the test is predictable (this test would occasianlly fail on
slower machines, when console.log doesn't run fast enough to finish
after emitting
Runtime.consoleAPICalled
and before the parent processsending
Runtime.evaluate
message.Ref: https://bugs.chromium.org/p/v8/issues/detail?id=10287
PR-URL: nodejs#32234
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=10287
Reviewed-By: Anna Henningsen anna@addaleax.net
Reviewed-By: Jiawen Geng technicalcute@gmail.com
Reviewed-By: Michaël Zasso targos@protonmail.com
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes