-
Camillo Bruni authored
Due to caching issues we will not be able to store host-defined options directly on the Script anymore. ScriptOrModule can thus no longer be a i::Script. NodeJS keeps weak references from ScriptOrModule to their import meta data. This CL changes ScriptOrModule to be a temporary struct which has a different lifetime. As a temporary fix until the API is fully updated we introduce the v8_scriptormodule_legacy_lifetime compile-time flag. It keeps references to ScriptOrModule alive on the Script to restore the previous behavior (at an additional memory cost). Bug: chromium:1244145 Change-Id: I1dc42d25930d7bc4f22ee3c9bba93d89425be406 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3211575 Commit-Queue: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Victor Gomes <victorgomes@chromium.org> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#77382}
52bb3cae