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:
parent
a9641176fd
commit
cd52245890
@ -665,9 +665,7 @@ BUILTIN(ArraySplice) {
|
|||||||
|
|
||||||
// Return empty array when no arguments are supplied.
|
// Return empty array when no arguments are supplied.
|
||||||
if (n_arguments == 0) {
|
if (n_arguments == 0) {
|
||||||
Object* result = AllocateEmptyJSArray();
|
return AllocateEmptyJSArray();
|
||||||
if (result->IsFailure()) return result;
|
|
||||||
return JSArray::cast(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int relative_start = 0;
|
int relative_start = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user