⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 244816 in webkit


Ignore:
Timestamp:
Apr 30, 2019, 5:32:15 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r244806.
https://bugs.webkit.org/show_bug.cgi?id=197446

Causing Test262 and JSC test failures on multiple builds
(Requested by ShawnRoberts on #webkit).

Reverted changeset:

"TypeArrays should not store properties that are canonical
numeric indices"
https://bugs.webkit.org/show_bug.cgi?id=197228
https://trac.webkit.org/changeset/244806

Location:
trunk
Files:
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r244806 r244816  
     12019-04-30  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r244806.
     4        https://bugs.webkit.org/show_bug.cgi?id=197446
     5
     6        Causing Test262 and JSC test failures on multiple builds
     7        (Requested by ShawnRoberts on #webkit).
     8
     9        Reverted changeset:
     10
     11        "TypeArrays should not store properties that are canonical
     12        numeric indices"
     13        https://bugs.webkit.org/show_bug.cgi?id=197228
     14        https://trac.webkit.org/changeset/244806
     15
    1162019-04-30  Tadeu Zagallo  <tzagallo@apple.com>
    217
  • trunk/LayoutTests/ChangeLog

    r244813 r244816  
     12019-04-30  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r244806.
     4        https://bugs.webkit.org/show_bug.cgi?id=197446
     5
     6        Causing Test262 and JSC test failures on multiple builds
     7        (Requested by ShawnRoberts on #webkit).
     8
     9        Reverted changeset:
     10
     11        "TypeArrays should not store properties that are canonical
     12        numeric indices"
     13        https://bugs.webkit.org/show_bug.cgi?id=197228
     14        https://trac.webkit.org/changeset/244806
     15
    1162019-04-30  Youenn Fablet  <youenn@apple.com>
    217
  • trunk/LayoutTests/fast/canvas/canvas-ImageData-behaviour-expected.txt

    r244806 r244816  
    4444PASS imageData.data[0] = undefined, imageData.data[0] is 0
    4545PASS imageData.data['foo']='garbage',imageData.data['foo'] is 'garbage'
    46 PASS imageData.data[-1]='garbage',imageData.data[-1] is undefined
     46PASS imageData.data[-1]='garbage',imageData.data[-1] is 'garbage'
    4747PASS imageData.data[17]='garbage',imageData.data[17] is undefined
    4848PASS successfullyParsed is true
  • trunk/LayoutTests/fast/canvas/canvas-ImageData-behaviour.js

    r244806 r244816  
    2222
    2323shouldBe("imageData.data['foo']='garbage',imageData.data['foo']", "'garbage'");
    24 shouldBe("imageData.data[-1]='garbage',imageData.data[-1]", "undefined");
     24shouldBe("imageData.data[-1]='garbage',imageData.data[-1]", "'garbage'");
    2525shouldBe("imageData.data[17]='garbage',imageData.data[17]", "undefined");
  • trunk/Source/JavaScriptCore/CMakeLists.txt

    r244806 r244816  
    858858    runtime/JSGlobalLexicalEnvironment.h
    859859    runtime/JSGlobalObject.h
    860     runtime/JSGlobalObjectFunctions.h
    861860    runtime/JSGlobalObjectInlines.h
    862861    runtime/JSImmutableButterfly.h
  • trunk/Source/JavaScriptCore/ChangeLog

    r244811 r244816  
     12019-04-30  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r244806.
     4        https://bugs.webkit.org/show_bug.cgi?id=197446
     5
     6        Causing Test262 and JSC test failures on multiple builds
     7        (Requested by ShawnRoberts on #webkit).
     8
     9        Reverted changeset:
     10
     11        "TypeArrays should not store properties that are canonical
     12        numeric indices"
     13        https://bugs.webkit.org/show_bug.cgi?id=197228
     14        https://trac.webkit.org/changeset/244806
     15
    1162019-04-30  Saam barati  <sbarati@apple.com>
    217
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r244806 r244816  
    16701670                BC3046070E1F497F003232CF /* Error.h in Headers */ = {isa = PBXBuildFile; fileRef = BC3046060E1F497F003232CF /* Error.h */; settings = {ATTRIBUTES = (Private, ); }; };
    16711671                BC6AAAE50E1F426500AD87D8 /* ClassInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6AAAE40E1F426500AD87D8 /* ClassInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
    1672                 BC756FC90E2031B200DE7D12 /* JSGlobalObjectFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = BC756FC70E2031B200DE7D12 /* JSGlobalObjectFunctions.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1672                BC756FC90E2031B200DE7D12 /* JSGlobalObjectFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = BC756FC70E2031B200DE7D12 /* JSGlobalObjectFunctions.h */; };
    16731673                BC87CDB910712AD4000614CF /* JSONObject.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = BC87CDB810712ACA000614CF /* JSONObject.lut.h */; };
    16741674                BC9041480EB9250900FE26FA /* StructureTransitionTable.h in Headers */ = {isa = PBXBuildFile; fileRef = BC9041470EB9250900FE26FA /* StructureTransitionTable.h */; settings = {ATTRIBUTES = (Private, ); }; };
  • trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h

    r244806 r244816  
    11/*
    2  * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    360360        return false;
    361361    }
    362 
    363     if (canonicalNumericIndexString(propertyName))
    364         return false;
    365 
     362   
    366363    return Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
    367364}
     
    379376    if (Optional<uint32_t> index = parseIndex(propertyName))
    380377        return putByIndex(thisObject, exec, index.value(), value, slot.isStrictMode());
    381 
    382     if (canonicalNumericIndexString(propertyName))
    383         return false;
    384 
     378   
    385379    return Base::put(thisObject, exec, propertyName, value, slot);
    386380}
     
    417411        return true;
    418412    }
    419 
    420     if (canonicalNumericIndexString(propertyName))
    421         return false;
    422 
     413   
    423414    RELEASE_AND_RETURN(scope, Base::defineOwnProperty(thisObject, exec, propertyName, descriptor, shouldThrow));
    424415}
     
    443434template<typename Adaptor>
    444435bool JSGenericTypedArrayView<Adaptor>::getOwnPropertySlotByIndex(
    445     JSObject* object, ExecState*, unsigned propertyName, PropertySlot& slot)
     436    JSObject* object, ExecState* exec, unsigned propertyName, PropertySlot& slot)
    446437{
    447438    JSGenericTypedArrayView* thisObject = jsCast<JSGenericTypedArrayView*>(object);
     
    452443    }
    453444
    454     if (propertyName > MAX_ARRAY_INDEX)
    455         return false;
     445    if (propertyName > MAX_ARRAY_INDEX) {
     446        return thisObject->methodTable(exec->vm())->getOwnPropertySlot(
     447            thisObject, exec, Identifier::from(exec, propertyName), slot);
     448    }
    456449   
    457450    if (!thisObject->canGetIndexQuickly(propertyName))
     
    464457template<typename Adaptor>
    465458bool JSGenericTypedArrayView<Adaptor>::putByIndex(
    466     JSCell* cell, ExecState* exec, unsigned propertyName, JSValue value, bool)
     459    JSCell* cell, ExecState* exec, unsigned propertyName, JSValue value, bool shouldThrow)
    467460{
    468461    JSGenericTypedArrayView* thisObject = jsCast<JSGenericTypedArrayView*>(cell);
    469462
    470     if (propertyName > MAX_ARRAY_INDEX)
    471         return false;
     463    if (propertyName > MAX_ARRAY_INDEX) {
     464        PutPropertySlot slot(JSValue(thisObject), shouldThrow);
     465        return thisObject->methodTable(exec->vm())->put(thisObject, exec, Identifier::from(exec, propertyName), value, slot);
     466    }
    472467   
    473468    return thisObject->setIndex(exec, propertyName, value);
  • trunk/Source/JavaScriptCore/runtime/JSTypedArrays.cpp

    r244806 r244816  
    5656}
    5757
     58
    5859} // namespace JSC
    5960
  • trunk/Source/JavaScriptCore/runtime/PropertyName.h

    r244806 r244816  
    2727
    2828#include "Identifier.h"
    29 #include "JSGlobalObjectFunctions.h"
    3029#include "PrivateName.h"
    3130#include <wtf/Optional.h>
    32 #include <wtf/dtoa.h>
    3331
    3432namespace JSC {
     
    133131}
    134132
    135 // https://www.ecma-international.org/ecma-262/9.0/index.html#sec-canonicalnumericindexstring
    136 ALWAYS_INLINE Optional<double> canonicalNumericIndexString(const PropertyName& propertyName)
    137 {
    138     StringImpl* property = propertyName.uid();
    139     if (equal(property, "-0"))
    140         return { -0.0 };
    141     double index = jsToNumber(property);
    142     NumberToStringBuffer buffer;
    143     const char* indexString = WTF::numberToString(index, buffer);
    144     if (!equal(property, indexString))
    145         return WTF::nullopt;
    146     return { index };
    147 }
    148 
    149133} // namespace JSC
Note: See TracChangeset for help on using the changeset viewer.