| Index: src/heap-inl.h
|
| diff --git a/src/heap-inl.h b/src/heap-inl.h
|
| index efad2fbf5969cf7604915db269934615e36c3a9a..15affe6cbd2235a18d0e76d47ecbae9dac1e1a57 100644
|
| --- a/src/heap-inl.h
|
| +++ b/src/heap-inl.h
|
| @@ -138,7 +138,7 @@ MaybeObject* Heap::AllocateInternalizedStringImpl(
|
| MaybeObject* Heap::AllocateOneByteInternalizedString(Vector<const uint8_t> str,
|
| uint32_t hash_field) {
|
| if (str.length() > String::kMaxLength) {
|
| - return Failure::OutOfMemoryException(0x2);
|
| + return isolate()->ThrowInvalidStringLength();
|
| }
|
| // Compute map and object size.
|
| Map* map = ascii_internalized_string_map();
|
| @@ -171,7 +171,7 @@ MaybeObject* Heap::AllocateOneByteInternalizedString(Vector<const uint8_t> str,
|
| MaybeObject* Heap::AllocateTwoByteInternalizedString(Vector<const uc16> str,
|
| uint32_t hash_field) {
|
| if (str.length() > String::kMaxLength) {
|
| - return Failure::OutOfMemoryException(0x3);
|
| + return isolate()->ThrowInvalidStringLength();
|
| }
|
| // Compute map and object size.
|
| Map* map = internalized_string_map();
|
|
|