Skip to content

Commit a0f58b4

Browse files
committed
Fix compilation for arm-debug
1 parent a918902 commit a0f58b4

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/node_contextify.cc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,7 @@ void ContextifyContext::CompileFunction(
12451245
TryCatchScope try_catch(env);
12461246
Local<Object> result = CompileFunctionAndCacheResult(env,
12471247
parsing_context,
1248-
source,
1248+
&source,
12491249
params,
12501250
context_extensions,
12511251
options,
@@ -1309,7 +1309,7 @@ ScriptCompiler::CompileOptions ContextifyContext::GetCompileOptions(
13091309
Local<Object> ContextifyContext::CompileFunctionAndCacheResult(
13101310
Environment* env,
13111311
Local<Context> parsing_context,
1312-
const ScriptCompiler::Source& source,
1312+
ScriptCompiler::Source* source,
13131313
std::vector<Local<String>> params,
13141314
std::vector<Local<Object>> context_extensions,
13151315
ScriptCompiler::CompileOptions options,
@@ -1318,7 +1318,7 @@ Local<Object> ContextifyContext::CompileFunctionAndCacheResult(
13181318
const TryCatchScope& try_catch) {
13191319
MaybeLocal<Function> maybe_fn = ScriptCompiler::CompileFunction(
13201320
parsing_context,
1321-
const_cast<ScriptCompiler::Source*>(&source),
1321+
source,
13221322
params.size(),
13231323
params.data(),
13241324
context_extensions.size(),
@@ -1358,7 +1358,7 @@ Local<Object> ContextifyContext::CompileFunctionAndCacheResult(
13581358
if (StoreCodeCacheResult(env,
13591359
result,
13601360
options,
1361-
source,
1361+
*source,
13621362
produce_cached_data,
13631363
std::move(new_cached_data))
13641364
.IsNothing()) {
@@ -1401,11 +1401,11 @@ void ContextifyContext::ContainsModuleSyntax(
14011401

14021402
// TODO(geoffreybooth): Centralize this rather than matching the logic in
14031403
// cjs/loader.js and translators.js
1404-
Local<Symbol> id_symbol =
1405-
(String::Concat(isolate,
1406-
String::NewFromUtf8(isolate, "cjs:").ToLocalChecked(),
1407-
filename))
1408-
.As<Symbol>();
1404+
Local<String> script_id = String::Concat(
1405+
isolate,
1406+
String::NewFromUtf8(isolate, "cjs:").ToLocalChecked(),
1407+
filename);
1408+
Local<Symbol> id_symbol = Symbol::New(isolate, script_id);
14091409

14101410
Local<PrimitiveArray> host_defined_options =
14111411
GetHostDefinedOptions(isolate, id_symbol);
@@ -1424,7 +1424,7 @@ void ContextifyContext::ContainsModuleSyntax(
14241424

14251425
ContextifyContext::CompileFunctionAndCacheResult(env,
14261426
context,
1427-
source,
1427+
&source,
14281428
params,
14291429
std::vector<Local<Object>>(),
14301430
options,

src/node_contextify.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class ContextifyContext : public BaseObject {
8686
static v8::Local<v8::Object> CompileFunctionAndCacheResult(
8787
Environment* env,
8888
v8::Local<v8::Context> parsing_context,
89-
const v8::ScriptCompiler::Source& source,
89+
v8::ScriptCompiler::Source* source,
9090
std::vector<v8::Local<v8::String>> params,
9191
std::vector<v8::Local<v8::Object>> context_extensions,
9292
v8::ScriptCompiler::CompileOptions options,

0 commit comments

Comments
 (0)