Index: src/json-parser.h |
diff --git a/src/json-parser.h b/src/json-parser.h |
index 4c2b479182db68654866d2fbb128dff6987548ed..ca21421d44838ccdd4e23771d9da4679f51483d6 100644 |
--- a/src/json-parser.h |
+++ b/src/json-parser.h |
@@ -583,14 +583,14 @@ template <> |
inline Handle<SeqTwoByteString> NewRawString(Factory* factory, |
int length, |
PretenureFlag pretenure) { |
- return factory->NewRawTwoByteString(length, pretenure); |
+ return factory->NewRawTwoByteString(length, pretenure).ToHandleChecked(); |
} |
template <> |
inline Handle<SeqOneByteString> NewRawString(Factory* factory, |
int length, |
PretenureFlag pretenure) { |
- return factory->NewRawOneByteString(length, pretenure); |
+ return factory->NewRawOneByteString(length, pretenure).ToHandleChecked(); |
} |
@@ -606,7 +606,6 @@ Handle<String> JsonParser<seq_ascii>::SlowScanJsonString( |
int length = Min(max_length, Max(kInitialSpecialStringLength, 2 * count)); |
Handle<StringType> seq_string = |
NewRawString<StringType>(factory(), length, pretenure_); |
- ASSERT(!seq_string.is_null()); |
// Copy prefix into seq_str. |
SinkChar* dest = seq_string->GetChars(); |
String::WriteToFlat(*prefix, dest, start, end); |
@@ -793,8 +792,8 @@ Handle<String> JsonParser<seq_ascii>::ScanJsonString() { |
} |
} while (c0_ != '"'); |
int length = position_ - beg_pos; |
- Handle<String> result = factory()->NewRawOneByteString(length, pretenure_); |
- ASSERT(!result.is_null()); |
+ Handle<String> result = |
+ factory()->NewRawOneByteString(length, pretenure_).ToHandleChecked(); |
uint8_t* dest = SeqOneByteString::cast(*result)->GetChars(); |
String::WriteToFlat(*source_, dest, beg_pos, position_); |