Index: src/json-stringifier.h |
diff --git a/src/json-stringifier.h b/src/json-stringifier.h |
index 17c6b6f11141c52a589515f5d706371112411a8d..a083d48a09783348e2f006c212e0edda2ea6a8da 100644 |
--- a/src/json-stringifier.h |
+++ b/src/json-stringifier.h |
@@ -265,8 +265,7 @@ BasicJsonStringifier::BasicJsonStringifier(Isolate* isolate) |
accumulator_store_ = Handle<JSValue>::cast( |
factory_->ToObject(factory_->empty_string())); |
part_length_ = kInitialPartLength; |
- current_part_ = factory_->NewRawOneByteString(part_length_); |
- ASSERT(!current_part_.is_null()); |
+ current_part_ = factory_->NewRawOneByteString(part_length_).ToHandleChecked(); |
tojson_string_ = factory_->toJSON_string(); |
stack_ = factory_->NewJSArray(8); |
} |
@@ -308,18 +307,16 @@ MaybeObject* BasicJsonStringifier::StringifyString(Isolate* isolate, |
FlattenString(object); |
ASSERT(object->IsFlat()); |
if (object->IsOneByteRepresentationUnderneath()) { |
- Handle<String> result = |
- isolate->factory()->NewRawOneByteString(worst_case_length); |
- ASSERT(!result.is_null()); |
+ Handle<String> result = isolate->factory()->NewRawOneByteString( |
+ worst_case_length).ToHandleChecked(); |
DisallowHeapAllocation no_gc; |
return StringifyString_<SeqOneByteString>( |
isolate, |
object->GetFlatContent().ToOneByteVector(), |
result); |
} else { |
- Handle<String> result = |
- isolate->factory()->NewRawTwoByteString(worst_case_length); |
- ASSERT(!result.is_null()); |
+ Handle<String> result = isolate->factory()->NewRawTwoByteString( |
+ worst_case_length).ToHandleChecked(); |
DisallowHeapAllocation no_gc; |
return StringifyString_<SeqTwoByteString>( |
isolate, |
@@ -742,9 +739,11 @@ void BasicJsonStringifier::Extend() { |
part_length_ *= kPartLengthGrowthFactor; |
} |
if (is_ascii_) { |
- current_part_ = factory_->NewRawOneByteString(part_length_); |
+ current_part_ = |
+ factory_->NewRawOneByteString(part_length_).ToHandleChecked(); |
} else { |
- current_part_ = factory_->NewRawTwoByteString(part_length_); |
+ current_part_ = |
+ factory_->NewRawTwoByteString(part_length_).ToHandleChecked(); |
} |
ASSERT(!current_part_.is_null()); |
current_index_ = 0; |
@@ -754,7 +753,8 @@ void BasicJsonStringifier::Extend() { |
void BasicJsonStringifier::ChangeEncoding() { |
ShrinkCurrentPart(); |
Accumulate(); |
- current_part_ = factory_->NewRawTwoByteString(part_length_); |
+ current_part_ = |
+ factory_->NewRawTwoByteString(part_length_).ToHandleChecked(); |
ASSERT(!current_part_.is_null()); |
current_index_ = 0; |
is_ascii_ = false; |