Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 57574d1685234353cccfdc7ddfb03f084c206990..cb9f78021216b973913c4c1bea22d94fa0b32928 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -377,9 +377,7 @@ Handle<String> Factory::NewConsString(Handle<String> left, |
// Make sure that an out of memory exception is thrown if the length |
// of the new cons string is too large. |
if (length > String::kMaxLength || length < 0) { |
- isolate()->context()->mark_out_of_memory(); |
- V8::FatalProcessOutOfMemory("String concatenation result too large."); |
- UNREACHABLE(); |
+ isolate()->ThrowInvalidStringLength(); |
return Handle<String>::null(); |
} |