node/lib
Anna Henningsen af32d433ee lib: account for cwd access from snapshot serialization cb
Functions registered with `addSerializeCallback()` can access and call
`process.cwd()`. b7d836e2c7 accounted for the fact that it is
necessary to reset the cwd cache after the snapshot builder script has
run, but did not account for possible accesses from serialization
callbacks. To properly account for these, add a deserialization
callback as well.

As a related drive-by fix, also mention the execution order of
callbacks in the documentation.

Refs: https://github.com/nodejs/node/pull/49684
PR-URL: https://github.com/nodejs/node/pull/51901
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-03-01 09:20:49 +01:00
..
assert
dns
fs
inspector
internal lib: account for cwd access from snapshot serialization cb 2024-03-01 09:20:49 +01:00
path
readline readline: use addAbortListener 2023-07-11 19:50:13 +03:00
stream
test test_runner: adds built in lcov reporter 2023-11-11 20:38:21 +01:00
timers fs: use kResistStopPropagation 2023-06-24 15:52:38 +00:00
util
.eslintrc.yaml lib: expose default prepareStackTrace 2024-01-02 15:05:24 -03:00
_http_agent.js lib: remove deprecated string methods 2023-11-14 09:18:04 +01:00
_http_client.js lib: fix http client socket path 2024-03-01 09:20:49 +01:00
_http_common.js http: null the joinDuplicateHeaders property on cleanup 2023-07-03 06:20:13 +00:00
_http_incoming.js
_http_outgoing.js http: split set-cookie when using setHeaders 2024-02-15 12:06:49 +01:00
_http_server.js http: fix close return value mismatch between doc and implementation 2024-02-27 12:13:41 +01:00
_stream_duplex.js
_stream_passthrough.js
_stream_readable.js
_stream_transform.js
_stream_wrap.js
_stream_writable.js
_tls_common.js
_tls_wrap.js errors: improve hideStackFrames 2023-11-14 09:18:05 +01:00
assert.js lib: fix assert shows diff messages in ESM and CJS 2023-11-14 09:18:04 +01:00
async_hooks.js
buffer.js lib: move encodingsMap to internal/util 2024-02-29 12:54:51 +01:00
child_process.js typings: update JSDoc for cwd in child_process 2023-08-08 15:32:31 +08:00
cluster.js cluster: use ObjectPrototypeHasOwnProperty 2023-05-25 16:04:19 +00:00
console.js
constants.js
crypto.js crypto: implement crypto.hash() 2024-02-29 12:54:51 +01:00
dgram.js errors: improve hideStackFrames 2023-11-14 09:18:05 +01:00
diagnostics_channel.js doc: correct tracingChannel.traceCallback() 2023-12-15 15:26:23 -03:00
dns.js errors: improve hideStackFrames 2023-11-14 09:18:05 +01:00
domain.js lib: implement WeakReference on top of JS WeakRef 2023-08-16 18:45:07 +02:00
events.js stream: pre-allocate _events 2023-11-14 09:17:45 +01:00
fs.js fs: update jsdoc for filehandle.createWriteStream and appendFile 2024-02-15 12:05:48 +01:00
http.js lib: update params in jsdoc for HTTPRequestOptions 2023-09-29 13:14:24 +02:00
http2.js http2: add server handshake utility 2024-02-15 12:02:33 +01:00
https.js http: fix close return value mismatch between doc and implementation 2024-02-27 12:13:41 +01:00
inspector.js inspector: use private fields instead of symbols 2023-11-29 09:46:33 -03:00
module.js module: implement register utility 2023-06-12 00:00:46 +00:00
net.js net: fix connect crash when call destroy in lookup handler 2024-02-29 12:54:51 +01:00
os.js errors: improve hideStackFrames 2023-11-14 09:18:05 +01:00
path.js
perf_hooks.js
process.js
punycode.js
querystring.js
readline.js readline: use addAbortListener 2023-07-11 19:50:13 +03:00
repl.js repl: fix NO_COLORS env var is ignored 2024-02-15 12:05:54 +01:00
sea.js sea: support sea.getRawAsset() 2024-02-15 12:06:44 +01:00
stream.js errors: improve performance of instantiation 2023-09-28 09:57:38 +00:00
string_decoder.js lib: move encodingsMap to internal/util 2024-02-29 12:54:51 +01:00
sys.js
test.js test_runner: add initial draft for fakeTimers 2023-06-22 04:01:52 +00:00
timers.js timers: export timers.promises 2024-01-02 15:05:26 -03:00
tls.js
trace_events.js
tty.js errors: improve hideStackFrames 2023-11-14 09:18:05 +01:00
url.js url: validate pathToFileURL(path) argument as string 2023-08-31 20:35:04 +08:00
util.js util: add styleText API to text formatting 2024-02-27 12:10:14 +01:00
v8.js
vm.js vm: implement isContext() directly in JS land with private symbol 2024-02-19 14:14:41 +01:00
wasi.js
worker_threads.js
zlib.js zlib: pause stream if outgoing buffer is full 2024-02-13 15:26:53 +01:00