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

Unified Diff: src/string-builder.h

Issue 2069563002: [json] detect overflow sooner when serializing large sparse array. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: check string length upfront Created 4 years, 6 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/json-stringifier.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/string-builder.h
diff --git a/src/string-builder.h b/src/string-builder.h
index b92bb96e5e02f3c59a0b00faacce0873e1d9b5e2..192603f33f98025b7171554b7b2dc5c0eef6be0c 100644
--- a/src/string-builder.h
+++ b/src/string-builder.h
@@ -309,6 +309,8 @@ class IncrementalStringBuilder {
MaybeHandle<String> Finish();
+ INLINE(bool HasOverflowed()) const { return overflowed_; }
+
// Change encoding to two-byte.
void ChangeEncoding() {
DCHECK_EQ(String::ONE_BYTE_ENCODING, encoding_);
« no previous file with comments | « src/json-stringifier.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698