Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index f6051acc222929088cca0a78710dbb07cc763e33..ba2cdfd9f4c730ac732acf18f6e592c2f593c50a 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -1804,25 +1804,27 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_RegExpInitializeObject) { |
result = regexp->SetLocalPropertyIgnoreAttributes(heap->source_symbol(), |
source, |
final); |
- ASSERT(!result->IsFailure()); |
+ // TODO(jkummerow): Turn these back into ASSERTs when we can be certain |
+ // that it never fires in Release mode in the wild. |
+ CHECK(!result->IsFailure()); |
result = regexp->SetLocalPropertyIgnoreAttributes(heap->global_symbol(), |
global, |
final); |
- ASSERT(!result->IsFailure()); |
+ CHECK(!result->IsFailure()); |
result = |
regexp->SetLocalPropertyIgnoreAttributes(heap->ignore_case_symbol(), |
ignoreCase, |
final); |
- ASSERT(!result->IsFailure()); |
+ CHECK(!result->IsFailure()); |
result = regexp->SetLocalPropertyIgnoreAttributes(heap->multiline_symbol(), |
multiline, |
final); |
- ASSERT(!result->IsFailure()); |
+ CHECK(!result->IsFailure()); |
result = |
regexp->SetLocalPropertyIgnoreAttributes(heap->last_index_symbol(), |
Smi::FromInt(0), |
writable); |
- ASSERT(!result->IsFailure()); |
+ CHECK(!result->IsFailure()); |
USE(result); |
return regexp; |
} |
@@ -2913,7 +2915,7 @@ MUST_USE_RESULT static MaybeObject* StringReplaceAtomRegExpWithString( |
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(); |
+ if (result_len_64 > INT_MAX) return Failure::OutOfMemoryException(0x11); |
int result_len = static_cast<int>(result_len_64); |
int subject_pos = 0; |
@@ -5159,7 +5161,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_URIEscape) { |
ASSERT(String::kMaxLength < 0x7fffffff - 6); // Cannot overflow. |
if (escaped_length > String::kMaxLength) { |
isolate->context()->mark_out_of_memory(); |
- return Failure::OutOfMemoryException(); |
+ return Failure::OutOfMemoryException(0x12); |
} |
} |
} |
@@ -5766,7 +5768,7 @@ MUST_USE_RESULT static MaybeObject* ConvertCaseHelper( |
current_length += char_length; |
if (current_length > Smi::kMaxValue) { |
isolate->context()->mark_out_of_memory(); |
- return Failure::OutOfMemoryException(); |
+ return Failure::OutOfMemoryException(0x13); |
} |
} |
// Try again with the real length. |
@@ -6434,7 +6436,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringBuilderConcat) { |
CONVERT_ARG_CHECKED(JSArray, array, 0); |
if (!args[1]->IsSmi()) { |
isolate->context()->mark_out_of_memory(); |
- return Failure::OutOfMemoryException(); |
+ return Failure::OutOfMemoryException(0x14); |
} |
int array_length = args.smi_at(1); |
CONVERT_ARG_CHECKED(String, special, 2); |
@@ -6511,7 +6513,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringBuilderConcat) { |
} |
if (increment > String::kMaxLength - position) { |
isolate->context()->mark_out_of_memory(); |
- return Failure::OutOfMemoryException(); |
+ return Failure::OutOfMemoryException(0x15); |
} |
position += increment; |
} |
@@ -6551,7 +6553,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringBuilderJoin) { |
CONVERT_ARG_CHECKED(JSArray, array, 0); |
if (!args[1]->IsSmi()) { |
isolate->context()->mark_out_of_memory(); |
- return Failure::OutOfMemoryException(); |
+ return Failure::OutOfMemoryException(0x16); |
} |
int array_length = args.smi_at(1); |
CONVERT_ARG_CHECKED(String, separator, 2); |
@@ -6576,7 +6578,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringBuilderJoin) { |
(String::kMaxLength + separator_length - 1) / separator_length; |
if (max_nof_separators < (array_length - 1)) { |
isolate->context()->mark_out_of_memory(); |
- return Failure::OutOfMemoryException(); |
+ return Failure::OutOfMemoryException(0x17); |
} |
int length = (array_length - 1) * separator_length; |
for (int i = 0; i < array_length; i++) { |
@@ -6589,7 +6591,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringBuilderJoin) { |
int increment = element->length(); |
if (increment > String::kMaxLength - length) { |
isolate->context()->mark_out_of_memory(); |
- return Failure::OutOfMemoryException(); |
+ return Failure::OutOfMemoryException(0x18); |
} |
length += increment; |
} |