src: don't run bootstrapper in CreateEnvironment
Refs https://github.com/electron/electron/pull/22342.
https://github.com/nodejs/node/pull/26788 added a call to prepareMainThreadExecution
to CreateEnvironment
, which would prepare the main thread for execution any time an embedder created a new environment. However, this caused an unfortunate doubling-up effect, and meant that Electron would see stuff like:
> process.emit('warning', new Error('warn'))
(node:55797) Error: warn
(node:55797) Error: warn
Since both execution pathways (env and whatever the actual execution was) were being exercised. To fix this, I believe we should remove bootstrapping code from CreateEnvironment
.
cc @joyeecheung @addaleax
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines