Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(579)

Unified Diff: src/objects.cc

Issue 229943006: ElementsAccessor::SetLength() maybehandlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/objects.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698