Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(619)

Unified Diff: src/json-stringifier.h

Issue 223813002: Reland "Return MaybeHandle from NewConsString." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.h ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json-stringifier.h
diff --git a/src/json-stringifier.h b/src/json-stringifier.h
index 17c6b6f11141c52a589515f5d706371112411a8d..9b8a79c1c6e16198cfaf887ba47dc7cbacc9653f 100644
--- a/src/json-stringifier.h
+++ b/src/json-stringifier.h
@@ -501,8 +501,11 @@ BasicJsonStringifier::Result BasicJsonStringifier::SerializeGeneric(
part_length_ = kInitialPartLength; // Allocate conservatively.
Extend(); // Attach current part and allocate new part.
// Attach result string to the accumulator.
- Handle<String> cons = factory_->NewConsString(accumulator(), result_string);
- RETURN_IF_EMPTY_HANDLE_VALUE(isolate_, cons, EXCEPTION);
+ Handle<String> cons;
+ ASSIGN_RETURN_ON_EXCEPTION_VALUE(
+ isolate_, cons,
+ factory_->NewConsString(accumulator(), result_string),
+ EXCEPTION);
set_accumulator(cons);
return SUCCESS;
}
@@ -731,7 +734,8 @@ void BasicJsonStringifier::Accumulate() {
set_accumulator(factory_->empty_string());
overflowed_ = true;
} else {
- set_accumulator(factory_->NewConsString(accumulator(), current_part_));
+ set_accumulator(factory_->NewConsString(accumulator(),
+ current_part_).ToHandleChecked());
}
}
« no previous file with comments | « src/isolate.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698