Changeset 244816 in webkit
- Timestamp:
- Apr 30, 2019, 5:32:15 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 10 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/typed-array-canonical-numeric-index-string.js (deleted)
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/canvas/canvas-ImageData-behaviour-expected.txt (modified) (1 diff)
-
LayoutTests/fast/canvas/canvas-ImageData-behaviour.js (modified) (1 diff)
-
Source/JavaScriptCore/CMakeLists.txt (modified) (1 diff)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (modified) (1 diff)
-
Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h (modified) (7 diffs)
-
Source/JavaScriptCore/runtime/JSTypedArrays.cpp (modified) (1 diff)
-
Source/JavaScriptCore/runtime/PropertyName.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r244806 r244816 1 2019-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 1 16 2019-04-30 Tadeu Zagallo <tzagallo@apple.com> 2 17 -
trunk/LayoutTests/ChangeLog
r244813 r244816 1 2019-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 1 16 2019-04-30 Youenn Fablet <youenn@apple.com> 2 17 -
trunk/LayoutTests/fast/canvas/canvas-ImageData-behaviour-expected.txt
r244806 r244816 44 44 PASS imageData.data[0] = undefined, imageData.data[0] is 0 45 45 PASS imageData.data['foo']='garbage',imageData.data['foo'] is 'garbage' 46 PASS imageData.data[-1]='garbage',imageData.data[-1] is undefined46 PASS imageData.data[-1]='garbage',imageData.data[-1] is 'garbage' 47 47 PASS imageData.data[17]='garbage',imageData.data[17] is undefined 48 48 PASS successfullyParsed is true -
trunk/LayoutTests/fast/canvas/canvas-ImageData-behaviour.js
r244806 r244816 22 22 23 23 shouldBe("imageData.data['foo']='garbage',imageData.data['foo']", "'garbage'"); 24 shouldBe("imageData.data[-1]='garbage',imageData.data[-1]", " undefined");24 shouldBe("imageData.data[-1]='garbage',imageData.data[-1]", "'garbage'"); 25 25 shouldBe("imageData.data[17]='garbage',imageData.data[17]", "undefined"); -
trunk/Source/JavaScriptCore/CMakeLists.txt
r244806 r244816 858 858 runtime/JSGlobalLexicalEnvironment.h 859 859 runtime/JSGlobalObject.h 860 runtime/JSGlobalObjectFunctions.h861 860 runtime/JSGlobalObjectInlines.h 862 861 runtime/JSImmutableButterfly.h -
trunk/Source/JavaScriptCore/ChangeLog
r244811 r244816 1 2019-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 1 16 2019-04-30 Saam barati <sbarati@apple.com> 2 17 -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r244806 r244816 1670 1670 BC3046070E1F497F003232CF /* Error.h in Headers */ = {isa = PBXBuildFile; fileRef = BC3046060E1F497F003232CF /* Error.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1671 1671 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 */; }; 1673 1673 BC87CDB910712AD4000614CF /* JSONObject.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = BC87CDB810712ACA000614CF /* JSONObject.lut.h */; }; 1674 1674 BC9041480EB9250900FE26FA /* StructureTransitionTable.h in Headers */ = {isa = PBXBuildFile; fileRef = BC9041470EB9250900FE26FA /* StructureTransitionTable.h */; settings = {ATTRIBUTES = (Private, ); }; }; -
trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h
r244806 r244816 1 1 /* 2 * Copyright (C) 2013-201 9Apple Inc. All rights reserved.2 * Copyright (C) 2013-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 360 360 return false; 361 361 } 362 363 if (canonicalNumericIndexString(propertyName)) 364 return false; 365 362 366 363 return Base::getOwnPropertySlot(thisObject, exec, propertyName, slot); 367 364 } … … 379 376 if (Optional<uint32_t> index = parseIndex(propertyName)) 380 377 return putByIndex(thisObject, exec, index.value(), value, slot.isStrictMode()); 381 382 if (canonicalNumericIndexString(propertyName)) 383 return false; 384 378 385 379 return Base::put(thisObject, exec, propertyName, value, slot); 386 380 } … … 417 411 return true; 418 412 } 419 420 if (canonicalNumericIndexString(propertyName)) 421 return false; 422 413 423 414 RELEASE_AND_RETURN(scope, Base::defineOwnProperty(thisObject, exec, propertyName, descriptor, shouldThrow)); 424 415 } … … 443 434 template<typename Adaptor> 444 435 bool JSGenericTypedArrayView<Adaptor>::getOwnPropertySlotByIndex( 445 JSObject* object, ExecState* , unsigned propertyName, PropertySlot& slot)436 JSObject* object, ExecState* exec, unsigned propertyName, PropertySlot& slot) 446 437 { 447 438 JSGenericTypedArrayView* thisObject = jsCast<JSGenericTypedArrayView*>(object); … … 452 443 } 453 444 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 } 456 449 457 450 if (!thisObject->canGetIndexQuickly(propertyName)) … … 464 457 template<typename Adaptor> 465 458 bool JSGenericTypedArrayView<Adaptor>::putByIndex( 466 JSCell* cell, ExecState* exec, unsigned propertyName, JSValue value, bool )459 JSCell* cell, ExecState* exec, unsigned propertyName, JSValue value, bool shouldThrow) 467 460 { 468 461 JSGenericTypedArrayView* thisObject = jsCast<JSGenericTypedArrayView*>(cell); 469 462 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 } 472 467 473 468 return thisObject->setIndex(exec, propertyName, value); -
trunk/Source/JavaScriptCore/runtime/JSTypedArrays.cpp
r244806 r244816 56 56 } 57 57 58 58 59 } // namespace JSC 59 60 -
trunk/Source/JavaScriptCore/runtime/PropertyName.h
r244806 r244816 27 27 28 28 #include "Identifier.h" 29 #include "JSGlobalObjectFunctions.h"30 29 #include "PrivateName.h" 31 30 #include <wtf/Optional.h> 32 #include <wtf/dtoa.h>33 31 34 32 namespace JSC { … … 133 131 } 134 132 135 // https://www.ecma-international.org/ecma-262/9.0/index.html#sec-canonicalnumericindexstring136 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 149 133 } // namespace JSC
Note:
See TracChangeset
for help on using the changeset viewer.