Index: runtime/vm/symbols.cc |
diff --git a/runtime/vm/symbols.cc b/runtime/vm/symbols.cc |
index d7afc33b32bee0558a598664a3ae2568b501a51d..3fcba6f8cf201285ed4107ea71adfe3ecebbbb0b 100644 |
--- a/runtime/vm/symbols.cc |
+++ b/runtime/vm/symbols.cc |
@@ -383,7 +383,13 @@ RawString* Symbols::FromUTF32(const int32_t* utf32_array, intptr_t len) { |
RawString* Symbols::FromConcat(const String& str1, const String& str2) { |
- return NewSymbol(ConcatString(str1, str2)); |
+ if (str1.Length() == 0) { |
+ return New(str2); |
+ } else if (str2.Length() == 0) { |
+ return New(str1); |
+ } else { |
+ return NewSymbol(ConcatString(str1, str2)); |
+ } |
} |