mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
Previously the addAfterUserSerailizeCallback() wasn't ready to be used for building the built-in snapshot. This patch initializes the callbacks at the time lib/internal/v8/start_snapshot.js is loaded, so that these callbacks get run correctly when building the built-in snapshot. Currently when building the built-in snapshot, addAfterUserSerializeCallback() is only used by createUnsafeBuffer(), other usages can only come from user-land snapshots, which is covered by tests, but what gets run by the built-in snapshot building process is less visible, and the path used by createUnsafeBuffer() isn't reliably visible in user land either. This adds an internal usage counter in debug builds to verify this path when building the built-in snapshot. PR-URL: https://github.com/nodejs/node/pull/60434 Fixes: https://github.com/nodejs/node/issues/60423 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com> |
||
|---|---|---|
| .. | ||
| check_syntax.js | ||
| embedding.js | ||
| eval_stdin.js | ||
| eval_string.js | ||
| inspect.js | ||
| mksnapshot.js | ||
| print_help.js | ||
| prof_process.js | ||
| repl.js | ||
| run_main_module.js | ||
| test_runner.js | ||
| watch_mode.js | ||
| worker_thread.js | ||