From 40ac2ffdff07cd532eb4df371049eae8f7e847cc Mon Sep 17 00:00:00 2001 From: Geoffrey Booth Date: Tue, 17 Oct 2023 14:19:34 -0700 Subject: [PATCH] Fix compilation for arm-debug --- src/node_contextify.cc | 10 +++++----- src/node_contextify.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/node_contextify.cc b/src/node_contextify.cc index e9f78d472210b4..a3ce27d0d4062f 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -1245,7 +1245,7 @@ void ContextifyContext::CompileFunction( TryCatchScope try_catch(env); Local result = CompileFunctionAndCacheResult(env, parsing_context, - source, + &source, params, context_extensions, options, @@ -1309,7 +1309,7 @@ ScriptCompiler::CompileOptions ContextifyContext::GetCompileOptions( Local ContextifyContext::CompileFunctionAndCacheResult( Environment* env, Local parsing_context, - const ScriptCompiler::Source& source, + ScriptCompiler::Source* source, std::vector> params, std::vector> context_extensions, ScriptCompiler::CompileOptions options, @@ -1318,7 +1318,7 @@ Local ContextifyContext::CompileFunctionAndCacheResult( const TryCatchScope& try_catch) { MaybeLocal maybe_fn = ScriptCompiler::CompileFunction( parsing_context, - const_cast(&source), + source, params.size(), params.data(), context_extensions.size(), @@ -1358,7 +1358,7 @@ Local ContextifyContext::CompileFunctionAndCacheResult( if (StoreCodeCacheResult(env, result, options, - source, + *source, produce_cached_data, std::move(new_cached_data)) .IsNothing()) { @@ -1424,7 +1424,7 @@ void ContextifyContext::ContainsModuleSyntax( ContextifyContext::CompileFunctionAndCacheResult(env, context, - source, + &source, params, std::vector>(), options, diff --git a/src/node_contextify.h b/src/node_contextify.h index 997e98638005bc..721c146ff88c35 100644 --- a/src/node_contextify.h +++ b/src/node_contextify.h @@ -86,7 +86,7 @@ class ContextifyContext : public BaseObject { static v8::Local CompileFunctionAndCacheResult( Environment* env, v8::Local parsing_context, - const v8::ScriptCompiler::Source& source, + v8::ScriptCompiler::Source* source, std::vector> params, std::vector> context_extensions, v8::ScriptCompiler::CompileOptions options,