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

Unified Diff: src/string-builder.h

Issue 1423833003: Canonicalize handles for optimized compilation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix 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 76b6f5bf1359623b553444e7577c3186979d7690..98bd82b97a011712e14c8365e1c007231378c211 100644
--- a/src/string-builder.h
+++ b/src/string-builder.h
@@ -346,10 +346,12 @@ class IncrementalStringBuilder {
DCHECK(string->length() >= required_length);
}
- ~NoExtendString() {
+ Handle<String> Finalize() {
Handle<SeqString> string = Handle<SeqString>::cast(string_);
int length = NoExtend<DestChar>::written();
- *string_.location() = *SeqString::Truncate(string, length);
+ Handle<String> result = SeqString::Truncate(string, length);
+ string_ = Handle<String>();
+ return result;
}
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