Changeset 207344 in webkit


Ignore:
Timestamp:
Oct 14, 2016 9:23:42 AM (8 years ago)
Author:
Ryan Haddad
Message:

Unreviewed, rolling out r207322.

This change caused JSC test failures

Reverted changeset:

"Fix Array.prototype.splice ES6 compliance."
https://bugs.webkit.org/show_bug.cgi?id=163372
http://trac.webkit.org/changeset/207322

Location:
trunk
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r207341 r207344  
     12016-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
    1132016-10-14  Mark Lam  <mark.lam@apple.com>
    214
  • trunk/Source/JavaScriptCore/ChangeLog

    r207341 r207344  
     12016-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
    1132016-10-14  Mark Lam  <mark.lam@apple.com>
    214
  • trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp

    r207322 r207344  
    923923
    924924    unsigned actualStart = argumentClampedIndexFromStartOrEnd(exec, 0, length);
    925     RETURN_IF_EXCEPTION(scope, encodedJSValue());
    926925
    927926    unsigned actualDeleteCount = length - actualStart;
    928     unsigned insertCount = 0;
    929927    if (exec->argumentCount() > 1) {
    930         insertCount = exec->argumentCount() - 2;
    931928        double deleteCount = exec->uncheckedArgument(1).toInteger(exec);
    932929        if (deleteCount < 0)
     
    938935    }
    939936
    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=163417
    942 
    943937    std::pair<SpeciesConstructResult, JSObject*> speciesResult = speciesConstructArray(exec, thisObj, actualDeleteCount);
    944     ASSERT(!scope.exception() || speciesResult.first == SpeciesConstructResult::Exception);
    945938    if (speciesResult.first == SpeciesConstructResult::Exception)
    946         return encodedJSValue();
     939        return JSValue::encode(jsUndefined());
    947940
    948941    JSObject* result = nullptr;
     
    974967                result->initializeIndex(vm, k, v);
    975968            }
    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);
    984973    if (itemCount < actualDeleteCount) {
    985974        shift<JSArray::ShiftCountForSplice>(exec, thisObj, actualStart, actualDeleteCount, itemCount, length);
Note: See TracChangeset for help on using the changeset viewer.