Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 3485f5fe1408022631df75120ae1f582f26a6d27..68e6721378a48de7d419b88a6222ea81516b5b1e 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -11438,8 +11438,9 @@ static void EndPerformSplice(Handle<JSArray> object) { |
} |
-Handle<Object> JSArray::SetElementsLength(Handle<JSArray> array, |
- Handle<Object> new_length_handle) { |
+MaybeHandle<Object> JSArray::SetElementsLength( |
+ Handle<JSArray> array, |
+ Handle<Object> new_length_handle) { |
// We should never end in here with a pixel or external array. |
ASSERT(array->AllowsSetElementsLength()); |
if (!array->map()->is_observed()) { |
@@ -11477,9 +11478,11 @@ Handle<Object> JSArray::SetElementsLength(Handle<JSArray> array, |
} |
} |
- Handle<Object> hresult = |
- array->GetElementsAccessor()->SetLength(array, new_length_handle); |
- RETURN_IF_EMPTY_HANDLE_VALUE(isolate, hresult, hresult); |
+ Handle<Object> hresult; |
+ ASSIGN_RETURN_ON_EXCEPTION( |
+ isolate, hresult, |
+ array->GetElementsAccessor()->SetLength(array, new_length_handle), |
+ Object); |
CHECK(array->length()->ToArrayIndex(&new_length)); |
if (old_length == new_length) return hresult; |