Unverified Commit 7a82e5ee authored by Anna Henningsen's avatar Anna Henningsen
Browse files

inspector: turn platform tasks that outlive Agent into no-ops

Turn tasks scheduled on the `v8::Isolate` or on the given platform
into no-ops if the underlying `MainThreadInterface` has gone away
before the task could be run (which would happen when the
`Environment` instance and with it the `inspector::Agent` instance
are destroyed).

This addresses an issue that Electron has been having with
inspector support, and generally just seems like the right thing
to do, as we may not fully be in control of the relative timing
of Environment teardown, platform tasksexecution, and the
execution of `RequestInterrupt()` callbacks (although
the former two always happen in the same order in our own code).

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


Reviewed-By: default avatarEugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: default avatarShelley Vohr <codebytere@gmail.com>
Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
parent 5a042a6b
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