Reviewers: Jakob,
Message:
PTAL.
Description:
Merging r9980 into 3.6 branch (Catch OOM when sparse array join results in
too
large array).
Please review this at http://codereview.chromium.org/8540009/
SVN Base: https://v8.googlecode.com/svn/branches/3.6
Affected files:
M src/runtime.cc
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index
6cb8d1a2f2d5b4741f47b5fa0fbd0f54698ef5a4..123eeb2a9a2af477d4d42036e69a06d8235d492a
100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -6841,7 +6841,12 @@ RUNTIME_FUNCTION(MaybeObject*,
Runtime_SparseJoinWithSeparator) {
// Find total length of join result.
int string_length = 0;
bool is_ascii = separator->IsAsciiRepresentation();
- int max_string_length = SeqAsciiString::kMaxLength;
+ int max_string_length;
+ if (is_ascii) {
+ max_string_length = SeqAsciiString::kMaxLength;
+ } else {
+ max_string_length = SeqAsciiString::kMaxLength;
+ }
bool overflow = false;
CONVERT_NUMBER_CHECKED(int, elements_length,
Int32, elements_array->length());
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev