bootstrap: delay the instantiation of maps in per-context scripts · nodejs/node@2f9bafb · GitHub
Skip to content

Commit 2f9bafb

Browse files
joyeecheungtargos
authored andcommitted
bootstrap: delay the instantiation of maps in per-context scripts
Instantiating maps renders the snapshot non-rehashable (v8 currently fails silently during `CreateBlob()`). Then the hash seed would always be the same and not recomputed if custom V8 snapshot is enabled. This patch delays the instantiation of the maps in domexception.js and make it lazy. PR-URL: #27371 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent b21b28f commit 2f9bafb

1 file changed

Lines changed: 51 additions & 31 deletions

File tree

lib/internal/per_context/domexception.js

Lines changed: 51 additions & 31 deletions

0 commit comments

Comments
 (0)