Index: src/factory.cc |
=================================================================== |
--- src/factory.cc (revision 535) |
+++ src/factory.cc (working copy) |
@@ -79,6 +79,8 @@ |
Handle<String> Factory::NewConsString(Handle<String> first, |
Handle<String> second) { |
+ if (first->length() == 0) return second; |
+ if (second->length() == 0) return first; |
CALL_HEAP_FUNCTION(Heap::AllocateConsString(*first, *second), String); |
} |