From e1b97b883d48f23854d133729d2098dcb6b6aab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrg=C3=BCn=20Day=C4=B1o=C4=9Flu?= Date: Fri, 3 Jan 2025 00:59:50 +0100 Subject: [PATCH] fix tests --- src/node_contextify.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 557a4137f03d3b..3cf3f5c37cee26 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -1566,10 +1566,7 @@ Local ContextifyContext::CompileFunctionAndCacheResult( std::unique_ptr new_cached_data; if (produce_cached_data && !fn.IsEmpty()) { TryCatchScope try_cache(env); - Local resource_name = fn->GetScriptOrigin().ResourceName(); - if (!resource_name.IsEmpty() && - resource_name->ToString(parsing_context).ToLocalChecked()->Length() > - 0) { + if (options != ScriptCompiler::kConsumeCodeCache) { new_cached_data.reset(ScriptCompiler::CreateCodeCacheForFunction(fn)); } }