@@ -1166,7 +1166,7 @@ Maybe<void> StoreCodeCacheResult(
1166
1166
MaybeLocal<Function> CompileFunction (Local<Context> context,
1167
1167
Local<String> filename,
1168
1168
Local<String> content,
1169
- std::vector<Local< String> >* parameters) {
1169
+ LocalVector< String>* parameters) {
1170
1170
ScriptOrigin script_origin (filename, 0 , 0 , true );
1171
1171
ScriptCompiler::Source script_source (content, script_origin);
1172
1172
@@ -1483,7 +1483,7 @@ void ContextifyContext::CompileFunction(
1483
1483
Context::Scope scope (parsing_context);
1484
1484
1485
1485
// Read context extensions from buffer
1486
- std::vector<Local< Object>> context_extensions;
1486
+ LocalVector< Object> context_extensions (isolate) ;
1487
1487
if (!context_extensions_buf.IsEmpty ()) {
1488
1488
for (uint32_t n = 0 ; n < context_extensions_buf->Length (); n++) {
1489
1489
Local<Value> val;
@@ -1494,7 +1494,7 @@ void ContextifyContext::CompileFunction(
1494
1494
}
1495
1495
1496
1496
// Read params from params buffer
1497
- std::vector<Local< String>> params;
1497
+ LocalVector< String> params (isolate) ;
1498
1498
if (!params_buf.IsEmpty ()) {
1499
1499
for (uint32_t n = 0 ; n < params_buf->Length (); n++) {
1500
1500
Local<Value> val;
@@ -1526,22 +1526,23 @@ void ContextifyContext::CompileFunction(
1526
1526
args.GetReturnValue ().Set (result);
1527
1527
}
1528
1528
1529
- static std::vector<Local<String>> GetCJSParameters (IsolateData* data) {
1530
- return {
1531
- data->exports_string (),
1532
- data->require_string (),
1533
- data->module_string (),
1534
- data->__filename_string (),
1535
- data->__dirname_string (),
1536
- };
1529
+ static LocalVector<String> GetCJSParameters (IsolateData* data) {
1530
+ LocalVector<String> result (data->isolate (), {
1531
+ data->exports_string (),
1532
+ data->require_string (),
1533
+ data->module_string (),
1534
+ data->__filename_string (),
1535
+ data->__dirname_string (),
1536
+ });
1537
+ return result;
1537
1538
}
1538
1539
1539
1540
Local<Object> ContextifyContext::CompileFunctionAndCacheResult (
1540
1541
Environment* env,
1541
1542
Local<Context> parsing_context,
1542
1543
ScriptCompiler::Source* source,
1543
- std::vector<Local< String> > params,
1544
- std::vector<Local< Object> > context_extensions,
1544
+ LocalVector< String> params,
1545
+ LocalVector< Object> context_extensions,
1545
1546
ScriptCompiler::CompileOptions options,
1546
1547
bool produce_cached_data,
1547
1548
Local<Symbol> id_symbol,
@@ -1677,7 +1678,7 @@ static MaybeLocal<Function> CompileFunctionForCJSLoader(
1677
1678
options = ScriptCompiler::kConsumeCodeCache ;
1678
1679
}
1679
1680
1680
- std::vector<Local< String>> params;
1681
+ LocalVector< String> params (isolate) ;
1681
1682
if (is_cjs_scope) {
1682
1683
params = GetCJSParameters (env->isolate_data ());
1683
1684
}
0 commit comments