Replaces expectSyncExit() and expectSyncExitWithoutError(). Since
we usually just check the child process right after its spawned,
these shorthands also takes care of the spawning. This makes the
tests more concise.
PR-URL: https://github.com/nodejs/node/pull/49200
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
It's difficult for V8 to handle Error.stackTraceLimit in the snapshot,
so delete it from the Error constructor if it's present before
snapshot serialization, and re-install it after deserialization.
In addition try not to touch it from our internals during snapshot
building in the first place by updating
isErrorStackTraceLimitWritable().
PR-URL: https://github.com/nodejs/node/pull/44203
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>