Changeset 207344 in webkit
- Timestamp:
- Oct 14, 2016 9:23:42 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r207341 r207344 1 2016-10-14 Ryan Haddad <ryanhaddad@apple.com> 2 3 Unreviewed, rolling out r207322. 4 5 This change caused JSC test failures 6 7 Reverted changeset: 8 9 "Fix Array.prototype.splice ES6 compliance." 10 https://bugs.webkit.org/show_bug.cgi?id=163372 11 http://trac.webkit.org/changeset/207322 12 1 13 2016-10-14 Mark Lam <mark.lam@apple.com> 2 14 -
trunk/Source/JavaScriptCore/ChangeLog
r207341 r207344 1 2016-10-14 Ryan Haddad <ryanhaddad@apple.com> 2 3 Unreviewed, rolling out r207322. 4 5 This change caused JSC test failures 6 7 Reverted changeset: 8 9 "Fix Array.prototype.splice ES6 compliance." 10 https://bugs.webkit.org/show_bug.cgi?id=163372 11 http://trac.webkit.org/changeset/207322 12 1 13 2016-10-14 Mark Lam <mark.lam@apple.com> 2 14 -
trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
r207322 r207344 923 923 924 924 unsigned actualStart = argumentClampedIndexFromStartOrEnd(exec, 0, length); 925 RETURN_IF_EXCEPTION(scope, encodedJSValue());926 925 927 926 unsigned actualDeleteCount = length - actualStart; 928 unsigned insertCount = 0;929 927 if (exec->argumentCount() > 1) { 930 insertCount = exec->argumentCount() - 2;931 928 double deleteCount = exec->uncheckedArgument(1).toInteger(exec); 932 929 if (deleteCount < 0) … … 938 935 } 939 936 940 // FIXME: Need to implement step 8 of the spec https://tc39.github.io/ecma262/#sec-array.prototype.splice here.941 // https://bugs.webkit.org/show_bug.cgi?id=163417942 943 937 std::pair<SpeciesConstructResult, JSObject*> speciesResult = speciesConstructArray(exec, thisObj, actualDeleteCount); 944 ASSERT(!scope.exception() || speciesResult.first == SpeciesConstructResult::Exception);945 938 if (speciesResult.first == SpeciesConstructResult::Exception) 946 return encodedJSValue();939 return JSValue::encode(jsUndefined()); 947 940 948 941 JSObject* result = nullptr; … … 974 967 result->initializeIndex(vm, k, v); 975 968 } 976 ASSERT(!scope.exception()); 977 } 978 setLength(exec, vm, result, actualDeleteCount); 979 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 980 } 981 982 unsigned itemCount = insertCount; 983 ASSERT(itemCount == static_cast<unsigned>(std::max<int>(exec->argumentCount() - 2, 0))); 969 } 970 } 971 972 unsigned itemCount = std::max<int>(exec->argumentCount() - 2, 0); 984 973 if (itemCount < actualDeleteCount) { 985 974 shift<JSArray::ShiftCountForSplice>(exec, thisObj, actualStart, actualDeleteCount, itemCount, length);
Note: See TracChangeset
for help on using the changeset viewer.