Commit cd522458 authored by ricow@chromium.org's avatar ricow@chromium.org

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
parent a9641176
...@@ -665,9 +665,7 @@ BUILTIN(ArraySplice) { ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment