From ae11d1e0815919d27fe49ef8fdacc52a187ec201 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 2220869fa76f35..356ec3acd0bf3a 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc @@ -297,7 +297,7 @@ MaybeLocal BuiltinLoader::LookupAndCompileInternal( const bool has_cache = cached_data != nullptr; ScriptCompiler::CompileOptions options = has_cache ? ScriptCompiler::kConsumeCodeCache - : ScriptCompiler::kEagerCompile; + : ScriptCompiler::kNoCompileOptions; ScriptCompiler::Source script_source(source, origin, cached_data); per_process::Debug(DebugCategory::CODE_CACHE, diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc index bfa048a4a8aa18..f70e6ddf4303f3 100644 --- a/src/node_snapshotable.cc +++ b/src/node_snapshotable.cc @@ -1484,7 +1484,7 @@ void CompileSerializeMain(const FunctionCallbackInfo& args) { parameters.data(), 0, nullptr, - ScriptCompiler::kEagerCompile) + ScriptCompiler::kNoCompileOptions) .ToLocal(&fn)) { args.GetReturnValue().Set(fn); }