From 280b1ebad3acd13798b3a18e0e4d9769f3949d63 Mon Sep 17 00:00:00 2001 From: legendecas Date: Tue, 23 Aug 2022 00:29:18 +0800 Subject: [PATCH] fixup! src: restore context default IsCodeGenerationFromStringsAllowed value --- src/node_snapshotable.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc index dcfa47e7bcaa6b..c688a9ec0ead6f 100644 --- a/src/node_snapshotable.cc +++ b/src/node_snapshotable.cc @@ -1048,6 +1048,7 @@ int SnapshotBuilder::Generate(SnapshotData* out, if (base_context.IsEmpty()) { return BOOTSTRAP_ERROR; } + ResetContextSettingsBeforeSnapshot(base_context); Local main_context = NewContext(isolate); if (main_context.IsEmpty()) { @@ -1116,10 +1117,9 @@ int SnapshotBuilder::Generate(SnapshotData* out, size_str.c_str()); } #endif - } - ResetContextSettingsBeforeSnapshot(base_context); - ResetContextSettingsBeforeSnapshot(main_context); + ResetContextSettingsBeforeSnapshot(main_context); + } // Global handles to the contexts can't be disposed before the // blob is created. So initialize all the contexts before adding them.