Index: src/string-builder.h |
diff --git a/src/string-builder.h b/src/string-builder.h |
index 98bd82b97a011712e14c8365e1c007231378c211..76b6f5bf1359623b553444e7577c3186979d7690 100644 |
--- a/src/string-builder.h |
+++ b/src/string-builder.h |
@@ -346,12 +346,10 @@ |
DCHECK(string->length() >= required_length); |
} |
- Handle<String> Finalize() { |
+ ~NoExtendString() { |
Handle<SeqString> string = Handle<SeqString>::cast(string_); |
int length = NoExtend<DestChar>::written(); |
- Handle<String> result = SeqString::Truncate(string, length); |
- string_ = Handle<String>(); |
- return result; |
+ *string_.location() = *SeqString::Truncate(string, length); |
} |
private: |