| Index: src/json-stringifier.h
|
| diff --git a/src/json-stringifier.h b/src/json-stringifier.h
|
| index c063b67c08e0c26b53599d24f131f89c182b3303..a75b3deed50eacb0863ef2eed4957302674e3ac6 100644
|
| --- a/src/json-stringifier.h
|
| +++ b/src/json-stringifier.h
|
| @@ -266,7 +266,6 @@ BasicJsonStringifier::BasicJsonStringifier(Isolate* isolate)
|
| factory_->ToObject(factory_->empty_string()));
|
| part_length_ = kInitialPartLength;
|
| current_part_ = factory_->NewRawOneByteString(part_length_);
|
| - ASSERT(!current_part_.is_null());
|
| tojson_string_ = factory_->toJSON_string();
|
| stack_ = factory_->NewJSArray(8);
|
| }
|
| @@ -310,7 +309,6 @@ MaybeObject* BasicJsonStringifier::StringifyString(Isolate* isolate,
|
| if (object->IsOneByteRepresentationUnderneath()) {
|
| Handle<String> result =
|
| isolate->factory()->NewRawOneByteString(worst_case_length);
|
| - ASSERT(!result.is_null());
|
| DisallowHeapAllocation no_gc;
|
| return StringifyString_<SeqOneByteString>(
|
| isolate,
|
| @@ -319,7 +317,6 @@ MaybeObject* BasicJsonStringifier::StringifyString(Isolate* isolate,
|
| } else {
|
| Handle<String> result =
|
| isolate->factory()->NewRawTwoByteString(worst_case_length);
|
| - ASSERT(!result.is_null());
|
| DisallowHeapAllocation no_gc;
|
| return StringifyString_<SeqTwoByteString>(
|
| isolate,
|
| @@ -725,6 +722,7 @@ void BasicJsonStringifier::ShrinkCurrentPart() {
|
| void BasicJsonStringifier::Accumulate() {
|
| if (accumulator()->length() + current_part_->length() > String::kMaxLength) {
|
| // Screw it. Simply set the flag and carry on. Throw exception at the end.
|
| + // We most likely will trigger a real OOM before even reaching this point.
|
| set_accumulator(factory_->empty_string());
|
| overflowed_ = true;
|
| } else {
|
| @@ -743,7 +741,6 @@ void BasicJsonStringifier::Extend() {
|
| } else {
|
| current_part_ = factory_->NewRawTwoByteString(part_length_);
|
| }
|
| - ASSERT(!current_part_.is_null());
|
| current_index_ = 0;
|
| }
|
|
|
| @@ -752,7 +749,6 @@ void BasicJsonStringifier::ChangeEncoding() {
|
| ShrinkCurrentPart();
|
| Accumulate();
|
| current_part_ = factory_->NewRawTwoByteString(part_length_);
|
| - ASSERT(!current_part_.is_null());
|
| current_index_ = 0;
|
| is_ascii_ = false;
|
| }
|
|
|