Fix mozilla and debug check failures.
This removes the expected failure of a mozilla test that we now pass (an empty array is returned if Array.splice is called with no arguments) and fixes debug check failure by allocating a new empty array using AllocateEmptyArray if splice is called with zero arguments (makes sure we can always create a handle). Review URL: http://codereview.chromium.org/3218010 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5377 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
d955b212b5
commit
f19d6133f2
@ -665,8 +665,9 @@ BUILTIN(ArraySplice) {
|
||||
|
||||
// Return empty array when no arguments are supplied.
|
||||
if (n_arguments == 0) {
|
||||
// No handle scope needed since we return directly.
|
||||
return *Factory::NewJSArray(0);
|
||||
Object* result = AllocateEmptyJSArray();
|
||||
if (result->IsFailure()) return result;
|
||||
return JSArray::cast(result);
|
||||
}
|
||||
|
||||
int relative_start = 0;
|
||||
|
@ -235,11 +235,6 @@ ecma_3/Number/15.7.4.7-1: FAIL_OK
|
||||
# toExponential argument restricted to range 0..20 in JSC/V8
|
||||
ecma_3/Number/15.7.4.6-1: FAIL_OK
|
||||
|
||||
# Array.prototype.slice with zero arguments return undefined in JSC/V8,
|
||||
# empty array in Spider/TraceMonkey.
|
||||
js1_5/Array/regress-451483: FAIL_OK
|
||||
|
||||
|
||||
#:=== RegExp:===
|
||||
# To be compatible with JSC we silently ignore flags that do not make
|
||||
# sense. These tests expects us to throw exceptions.
|
||||
|
Loading…
Reference in New Issue
Block a user