Unverified Commit 6f9f5464 authored by Anna Henningsen's avatar Anna Henningsen
Browse files

src: use env->RequestInterrupt() for inspector MainThreadInterface

This simplifies the code significantly, and removes the dependency of
the inspector code on the availability of a `MultiIsolatePlatform`
(by removing the dependency on a platform altogether).

It also fixes a memory leak that occurs when `RequestInterrupt()`
is used, but the interrupt handler is never called before the Isolate
is destroyed.

One downside is that this leads to a slight change in timing, because
inspector messages are not dispatched in a re-entrant way. This means
having to harden one test to account for that possibility by making
sure that the stack is always clear through a `setImmediate()`.
This does not affect the assertion made by the test, which is that
messages will not be delivered synchronously while other code is
executing.

https://github.com/nodejs/node/issues/32415

PR-URL: https://github.com/nodejs/node/pull/32523


Reviewed-By: default avatarMatheus Marchini <mat@mmarchini.me>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 32e3a6bb
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment