Commit 09056633 authored by Anna Henningsen's avatar Anna Henningsen Committed by Node.js GitHub Bot
Browse files

vm: add `SafeForTerminationScope`s for SIGINT interruptions

Some embedders, like Electron, choose to start Node.js with
`only_terminate_in_safe_scope` set to `true`. In those cases, parts
of the API that expect execution termination to happen need to
be marked as able to receive those events. In our case, this is
the Ctrl+C support of the `vm` module (and Workers, but since
we’re in control of creating the `Isolate` for them, that’s a
non-concern there).

Add those scopes and add a regression test.

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


Reviewed-By: default avatarShelley Vohr <codebytere@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarTobias Nießen <tniessen@tnie.de>
Reviewed-By: default avatarGus Caplan <me@gus.host>
parent e929d1f2
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