From d99ea4845ac2519b886b3073b47042a2ef6d4900 Mon Sep 17 00:00:00 2001 From: Keyhan Vakil Date: Thu, 6 Jul 2023 07:28:36 +0000 Subject: [PATCH] src: remove kEagerCompile for CompileFunction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It wasn't doing anything, and actually enabling it would cause some tests to fail. Refs: https://github.com/nodejs/node/pull/48576 PR-URL: https://github.com/nodejs/node/pull/48671 Refs: https://github.com/v8/v8/commit/cb00db4dba6c4a1900700d134e2293c59155db28 Reviewed-By: Darshan Sen Reviewed-By: Michaƫl Zasso --- src/node_builtins.cc | 2 +- src/node_snapshotable.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_builtins.cc b/src/node_builtins.cc index da0dab568fcf47..875fb0979950b7 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc @@ -285,7 +285,7 @@ MaybeLocal BuiltinLoader::LookupAndCompileInternal( const bool has_cache = cached_data.data != nullptr; ScriptCompiler::CompileOptions options = has_cache ? ScriptCompiler::kConsumeCodeCache - : ScriptCompiler::kEagerCompile; + : ScriptCompiler::kNoCompileOptions; ScriptCompiler::Source script_source( source, origin, diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc index 5724142de8e55c..59bcea00d3e7a6 100644 --- a/src/node_snapshotable.cc +++ b/src/node_snapshotable.cc @@ -1270,7 +1270,7 @@ void CompileSerializeMain(const FunctionCallbackInfo& args) { parameters.data(), 0, nullptr, - ScriptCompiler::kEagerCompile) + ScriptCompiler::kNoCompileOptions) .ToLocal(&fn)) { args.GetReturnValue().Set(fn); }