Files
node/test/parallel
Joyee Cheung 3a35e48ea7 inspector: avoid calling into JS from V8 interrupts
Our inspector implementation dispatches inspector messages from
a V8 interrupt handler, so they could be handled during an arbitrary
point of JS execution where re-calling into another irrelevant JS
code is not safe.

This patch tracks V8 interrupt state in this case and rewrite the
async hook toggling as state reconciliation, so requests only record
the desired state, which is applied once calling into JS is possible
and safe, and the actual invocation is deferred to an immediate when
inside an interrupt. This simplifies the previous mechanism and
makes re-entracy and early termination safer.

Drive-by: skip installing command line API extensions during
teardown when calling into JS is no longer safe.

Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65028
Refs: https://issues.chromium.org/u/1/issues/42212250
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/8173727
Refs: https://github.com/nodejs/node/pull/26935
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-08-14 16:14:48 +00:00
..
2026-08-01 14:48:00 +02:00
2026-07-18 12:59:37 -07:00
2026-07-18 12:59:37 -07:00
2026-07-18 12:59:37 -07:00
2026-07-18 12:59:37 -07:00
2026-07-18 12:59:37 -07:00
2026-07-18 12:59:37 -07:00
2026-07-18 12:59:37 -07:00
2026-08-05 22:50:13 -07:00