Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index b4c34ef76922cf8b997b6ecd72f34c88d85e3587..8b18e55278cb072cd89d8c43faaa34291369775f 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -3913,7 +3913,9 @@ MUST_USE_RESULT static MaybeObject* StringReplaceGlobalAtomRegExpWithString( |
static_cast<int64_t>(pattern_len)) * |
static_cast<int64_t>(matches) + |
static_cast<int64_t>(subject_len); |
- if (result_len_64 > INT_MAX) return Failure::OutOfMemoryException(0x11); |
+ if (result_len_64 > INT_MAX) { |
+ v8::internal::Heap::FatalProcessOutOfMemory("invalid string length", true); |
+ } |
int result_len = static_cast<int>(result_len_64); |
int subject_pos = 0; |