mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
src: snapshot loaders
This runs `lib/internal/bootstrap/loaders.js` before creating the builtin snapshot and deserialize the loaders from the snapshot in deserialization mode. PR-URL: https://github.com/nodejs/node/pull/32984 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
This commit is contained in:
6 files changed
+39
-3
No files matched your search
@@ -259,10 +259,17 @@ NodeMainInstance::CreateMainEnvironment(int* exit_code,
|
||||
env->InitializeInspector({});
|
||||
#endif
|
||||
|
||||
if (env->RunBootstrapping().IsEmpty()) {
|
||||
if (!deserialize_mode_ && env->RunBootstrapping().IsEmpty()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (deserialize_mode_ && env->BootstrapNode().IsEmpty()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CHECK(env->req_wrap_queue()->IsEmpty());
|
||||
CHECK(env->handle_wrap_queue()->IsEmpty());
|
||||
env->set_has_run_bootstrapping_code(true);
|
||||
return env;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user