Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 9ffb4dad206fe969d03bb0954c22160ae69eb35c..d6336f2846be74c571a5b694d35529236c76af7c 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -2742,9 +2742,10 @@ MaybeLocal<Value> JSON::Parse(Isolate* v8_isolate, Local<String> json_string) { |
PREPARE_FOR_EXECUTION_WITH_ISOLATE(isolate, JSON, Parse, Value); |
i::Handle<i::String> string = Utils::OpenHandle(*json_string); |
i::Handle<i::String> source = i::String::Flatten(string); |
+ i::Handle<i::Object> undefined = isolate->factory()->undefined_value(); |
auto maybe = source->IsSeqOneByteString() |
- ? i::JsonParser<true>::Parse(source) |
- : i::JsonParser<false>::Parse(source); |
+ ? i::JsonParser<true>::Parse(isolate, source, undefined) |
+ : i::JsonParser<false>::Parse(isolate, source, undefined); |
Local<Value> result; |
has_pending_exception = !ToLocal<Value>(maybe, &result); |
RETURN_ON_FAILED_EXECUTION(Value); |
@@ -2756,9 +2757,10 @@ MaybeLocal<Value> JSON::Parse(Local<Context> context, |
PREPARE_FOR_EXECUTION(context, JSON, Parse, Value); |
i::Handle<i::String> string = Utils::OpenHandle(*json_string); |
i::Handle<i::String> source = i::String::Flatten(string); |
+ i::Handle<i::Object> undefined = isolate->factory()->undefined_value(); |
auto maybe = source->IsSeqOneByteString() |
- ? i::JsonParser<true>::Parse(source) |
- : i::JsonParser<false>::Parse(source); |
+ ? i::JsonParser<true>::Parse(isolate, source, undefined) |
+ : i::JsonParser<false>::Parse(isolate, source, undefined); |
Local<Value> result; |
has_pending_exception = !ToLocal<Value>(maybe, &result); |
RETURN_ON_FAILED_EXECUTION(Value); |