Skip to content

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.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading