Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 9fa1e12abe19253aad57c1e743863fd30ceac259..20dd19db9a4c17f34f0759f3239056d6bc7e1bb5 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -334,8 +334,8 @@ Handle<ConsString> Factory::NewRawConsString(String::Encoding encoding) { |
} |
-Handle<String> Factory::NewConsString(Handle<String> left, |
- Handle<String> right) { |
+MaybeHandle<String> Factory::NewConsString(Handle<String> left, |
+ Handle<String> right) { |
int left_length = left->length(); |
if (left_length == 0) return right; |
int right_length = right->length(); |
@@ -352,8 +352,8 @@ 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()->ThrowInvalidStringLength(); |
- return Handle<String>::null(); |
+ return isolate()->Throw<String>( |
+ isolate()->factory()->NewInvalidStringLengthError()); |
} |
bool left_is_one_byte = left->IsOneByteRepresentation(); |