Simplify Array.splice by simply returning the result of AllocateEmptyJSArray.

Review URL: http://codereview.chromium.org/3216014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5382 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
ricow@chromium.org 2010-08-31 10:39:12 +00:00
parent a9641176fd
commit cd52245890

View File

@ -665,9 +665,7 @@ BUILTIN(ArraySplice) {
// Return empty array when no arguments are supplied.
if (n_arguments == 0) {
Object* result = AllocateEmptyJSArray();
if (result->IsFailure()) return result;
return JSArray::cast(result);
return AllocateEmptyJSArray();
}
int relative_start = 0;