Skip to content

Commit

Permalink
Fix running on Node 20.11
Browse files Browse the repository at this point in the history
CompileFunctionInContext was removed.

See nodejs/node-v8#214.

Fixes laverdet#436.
  • Loading branch information
orgads committed Jan 16, 2024
1 parent b44f7d0 commit 5a1de02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/module/context_handle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class EvalClosureRunner : public CodeCompilerHolder, public ThreePhaseTask {
// Invoke `new Function` to compile script
auto source = GetSource();
auto function = RunWithAnnotatedErrors([&]() {
return Unmaybe(ScriptCompiler::CompileFunctionInContext(
return Unmaybe(ScriptCompiler::CompileFunction(
context, source.get(),
argument_names.size(), argument_names.empty() ? nullptr : &argument_names[0],
0, nullptr
Expand Down

0 comments on commit 5a1de02

Please sign in to comment.