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

Unified Diff: src/runtime/runtime-strings.cc

Issue 2549773002: Internalize strings in-place (Closed)
Patch Set: forgot one Created 4 years 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
Index: src/runtime/runtime-strings.cc
diff --git a/src/runtime/runtime-strings.cc b/src/runtime/runtime-strings.cc
index 46bb4aad60f48d4f2cb68fb9a8f0a9f98b113962..e7487b8144b7395be7f0f78712c4f39fc23bff1b 100644
--- a/src/runtime/runtime-strings.cc
+++ b/src/runtime/runtime-strings.cc
@@ -262,6 +262,9 @@ RUNTIME_FUNCTION(Runtime_StringBuilderConcat) {
if (length == -1) {
return isolate->Throw(isolate->heap()->illegal_argument_string());
}
+ if (length == 0) {
+ return isolate->heap()->empty_string();
+ }
if (one_byte) {
Handle<SeqOneByteString> answer;

Powered by Google App Engine
This is Rietveld 408576698