Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2021-11-18 06:56:39 +0300
committerBryan English <bryan@bryanenglish.com>2022-05-30 19:26:49 +0300
commit85d81a764f7ddd60a18ea772bf912950b0818b2f (patch)
tree786c07ce8692d404f57e5057006a96a091fb91a4 /test
parent82fb037388f510fde52558c8e19746a5ebb63938 (diff)
bootstrap: include code cache in the embedded snapshot
Since V8 code cache encodes indices to the read-only space it is safer to make sure that the code cache is generated in the same heap used to generate the embdded snapshot. This patch merges the code cache builder into the snapshot builder and makes the code cache part of node::SnapshotData that is deserialized into the native module loader during bootstrap. PR-URL: https://github.com/nodejs/node/pull/43023 Fixes: https://github.com/nodejs/node/issues/31074 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-code-cache.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-code-cache.js b/test/parallel/test-code-cache.js
index f61ed9f5c54..00deafd6d49 100644
--- a/test/parallel/test-code-cache.js
+++ b/test/parallel/test-code-cache.js
@@ -36,8 +36,8 @@ const loadedModules = extractModules(process.moduleLoadList);
// Cross-compiled binaries do not have code cache, verifies that the builtins
// are all compiled without cache and we are doing the bookkeeping right.
if (!process.features.cached_builtins) {
- console.log('The binary is not configured with code cache');
- assert(!process.config.variables.node_use_node_code_cache);
+ assert(!process.config.variables.node_use_node_code_cache ||
+ process.execArgv.includes('--no-node-snapshot'));
if (isMainThread) {
assert.deepStrictEqual(compiledWithCache, new Set());