Skip to content

inspector: only write coverage in fully bootstrapped Environments

The NODE_V8_COVERAGE folder and the source map computation are setup during pre-execution since they rely on environment variables as well as JS states. Therefore, we need to give up serialization of JS coverage profiles for Environments that have not go through pre-execution. Currently this is only possible for Environments created using the embedder API CreateEnvironment().

As a result we won't have JS coverage data for most cctests, but if that proves to be necessary we could just run lib/internal/main/environment.js for these Environments created for cctests.

Fixes: https://github.com/nodejs/node/issues/32912 Refs: https://github.com/nodejs/node/commit/65e18a8e9f912dfa04a804124b6a19514bb45165 Refs: https://github.com/nodejs/node/commit/5bf43729a403b992cc90b5cdbbaaf505769d1107 Refs: https://github.com/nodejs/node/commit/8aa7ef7840ef5f7161f3195e51a3fa6783290160

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

Merge request reports

Loading