0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 21:19:50 +01:00
nodejs/lib
Joyee Cheung 33bbf3751b src: fixup Error.stackTraceLimit during snapshot building
When V8 creates a context for snapshot building, it does not
install Error.stackTraceLimit. As a result, error.stack would
be undefined in the snapshot builder script unless users
explicitly initialize Error.stackTraceLimit, which may be
surprising.

This patch initializes Error.stackTraceLimit based on the
value of --stack-trace-limit to prevent the surprise. If
users have modified Error.stackTraceLimit in the builder
script, the modified value would be restored during
deserialization. Otherwise, the fixed up limit would be
deleted since V8 expects to find it unset and re-initialize
it during snapshot deserialization.

PR-URL: https://github.com/nodejs/node/pull/55121
Fixes: https://github.com/nodejs/node/issues/55100
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-09-30 15:05:12 +00:00
..
assert
dns
fs
inspector
internal src: fixup Error.stackTraceLimit during snapshot building 2024-09-30 15:05:12 +00:00
path
readline
stream
test
timers
util
_http_agent.js
_http_client.js
_http_common.js
_http_incoming.js
_http_outgoing.js
_http_server.js
_stream_duplex.js
_stream_passthrough.js
_stream_readable.js
_stream_transform.js
_stream_wrap.js
_stream_writable.js
_tls_common.js
_tls_wrap.js
assert.js
async_hooks.js
buffer.js
child_process.js
cluster.js
console.js
constants.js
crypto.js
dgram.js
diagnostics_channel.js
dns.js
domain.js
eslint.config_partial.mjs
events.js
fs.js
http2.js
http.js
https.js
inspector.js
module.js
net.js
os.js
path.js
perf_hooks.js
process.js
punycode.js
querystring.js
readline.js
repl.js
sea.js
sqlite.js
stream.js
string_decoder.js
sys.js
test.js
timers.js
tls.js
trace_events.js
tty.js
url.js
util.js
v8.js
vm.js
wasi.js
worker_threads.js
zlib.js