Merge V8 5.3.332.45. DO NOT MERGE
Test: Manual
FPIIM-449
Change-Id: Id3254828b068abdea3cb10442e0172a8c9a98e03
(cherry picked from commit 13e2dadd00298019ed862f2b2fc5068bba730bcf)
diff --git a/src/string-builder.h b/src/string-builder.h
index 98bd82b..192603f 100644
--- a/src/string-builder.h
+++ b/src/string-builder.h
@@ -293,6 +293,14 @@
}
}
+ INLINE(void AppendCString(const uc16* s)) {
+ if (encoding_ == String::ONE_BYTE_ENCODING) {
+ while (*s != '\0') Append<uc16, uint8_t>(*(s++));
+ } else {
+ while (*s != '\0') Append<uc16, uc16>(*(s++));
+ }
+ }
+
INLINE(bool CurrentPartCanFit(int length)) {
return part_length_ - current_index_ > length;
}
@@ -301,6 +309,8 @@
MaybeHandle<String> Finish();
+ INLINE(bool HasOverflowed()) const { return overflowed_; }
+
// Change encoding to two-byte.
void ChangeEncoding() {
DCHECK_EQ(String::ONE_BYTE_ENCODING, encoding_);