Unverified Commit 186c2fb6 authored by Joyee Cheung's avatar Joyee Cheung
Browse files

build: create V8 code cache after script is run

This patch makes it possible to generate the code cache
for the builtins directly from the original script object
(instead of compiling a new one) and after the script has
been run (via `NativeModule.require`). Before this patch
only the top level functions (the wrapped ones)
are included in the cache, after this patch the inner
functions in those modules will be included as well.

Also blacklists modules from dependencies like V8 and
node-inspect since we cannot guarantee that they are suitable
to be executed directly.

PR-URL: https://github.com/nodejs/node/pull/21567
Refs: https://github.com/nodejs/node/issues/21563


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarTiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: default avatarGus Caplan <me@gus.host>
Reviewed-By: default avatarJohn-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
parent c91e0ed3
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment