Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Jan 2, 2025
1 parent 46ad86b commit e1b97b8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1566,10 +1566,7 @@ Local<Object> ContextifyContext::CompileFunctionAndCacheResult(
std::unique_ptr<ScriptCompiler::CachedData> new_cached_data;
if (produce_cached_data && !fn.IsEmpty()) {
TryCatchScope try_cache(env);
Local<Value> 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));
}
}
Expand Down

0 comments on commit e1b97b8

Please sign in to comment.