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

Unified Diff: src/string-builder.h

Issue 1417013007: Revert of Canonicalize handles for optimized compilation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/ppc/macro-assembler-ppc.cc ('k') | src/string-builder.cc » ('j') | 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 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:
« no previous file with comments | « src/ppc/macro-assembler-ppc.cc ('k') | src/string-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698