Changeset 202568 in webkit
- Timestamp:
- Jun 28, 2016 8:33:49 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202566 r202568 1 2016-06-28 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: selectElement.options shows unexpected entries in console (named indexes beyond collection length) 4 https://bugs.webkit.org/show_bug.cgi?id=159192 5 6 Reviewed by Timothy Hatcher. 7 8 * inspector/model/remote-object-get-properties-expected.txt: 9 * inspector/model/remote-object-get-properties.html: 10 * inspector/runtime/getProperties-expected.txt: 11 1 12 2016-06-28 Brian Burg <bburg@apple.com> 2 13 -
trunk/LayoutTests/inspector/model/remote-object-get-properties-expected.txt
r200585 r202568 319 319 __proto__ 320 320 ----------------------------------------------------- 321 322 ----------------------------------------------------- 323 EXPRESSION: document.getElementById('my-select').options 324 type: object 325 subtype: array 326 description: HTMLOptionsCollection 327 328 OWN PROPERTIES: 329 0 330 __proto__ 331 332 DISPLAYABLE PROPERTIES: 333 0 334 selectedIndex 335 length 336 __proto__ 337 338 ALL PROPERTIES: 339 0 340 constructor 341 selectedIndex 342 length 343 item 344 namedItem 345 add 346 remove 347 toString 348 toLocaleString 349 valueOf 350 hasOwnProperty 351 propertyIsEnumerable 352 isPrototypeOf 353 __defineGetter__ 354 __defineSetter__ 355 __lookupGetter__ 356 __lookupSetter__ 357 __proto__ 358 ----------------------------------------------------- 321 359 DONE 322 360 -
trunk/LayoutTests/inspector/model/remote-object-get-properties.html
r201855 r202568 46 46 var objectWithSymbolProperties = {prop:1, [Symbol()]:2, [Symbol('sym')]:3, [Symbol('sym')]:4, [Symbol()]: Symbol(), prop2: 5}; 47 47 48 49 48 // -------- 50 49 // test … … 62 61 {expression: "window.boundFunction"}, 63 62 {expression: "window.objectWithSymbolProperties"}, 63 {expression: "document.getElementById('my-select').options"}, 64 64 ] 65 65 … … 116 116 </head> 117 117 <body onload="window.loadEvent = event; runTest()"> 118 <select id="my-select" style="display: none"> 119 <option name="1" id="attr_1" value="1"></option> 120 </select> 118 121 </body> 119 122 </html> -
trunk/LayoutTests/inspector/runtime/getProperties-expected.txt
r201619 r202568 14 14 1 string green 15 15 2 string blue 16 length number 317 16 18 17 -- Running test case: CheckPropertiesOfBoundConstructor -
trunk/Source/JavaScriptCore/ChangeLog
r202567 r202568 1 2016-06-28 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: selectElement.options shows unexpected entries in console (named indexes beyond collection length) 4 https://bugs.webkit.org/show_bug.cgi?id=159192 5 6 Reviewed by Timothy Hatcher. 7 8 * inspector/InjectedScriptSource.js: 9 (InjectedScript.prototype.arrayIndexPropertyNames): 10 Start with an empty array because we just push valid indexes. 11 12 (InjectedScript.prototype._propertyDescriptors): 13 Avoid the >100 length requirement, and always treat the 14 array-like objects the same. The frontend currently 15 doesn't show named indexes for arrays anyways, so they 16 would have been unused. 17 1 18 2016-06-28 Per Arne Vollan <pvollan@apple.com> 2 19 -
trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js
r201168 r202568 667 667 function arrayIndexPropertyNames(o, length) 668 668 { 669 var array = new Array(length);669 var array = []; 670 670 for (var i = 0; i < length; ++i) { 671 671 if (i in o) … … 677 677 // FIXME: <https://webkit.org/b/143589> Web Inspector: Better handling for large collections in Object Trees 678 678 // For array types with a large length we attempt to skip getOwnPropertyNames and instead just sublist of indexes. 679 var isArray TypeWithLargeLength= false;679 var isArrayLike = false; 680 680 try { 681 isArray TypeWithLargeLength = injectedScript._subtype(object) === "array" && isFinite(object.length) && object.length > 100;681 isArrayLike = injectedScript._subtype(object) === "array" && isFinite(object.length); 682 682 } catch(e) {} 683 683 … … 685 685 var isOwnProperty = o === object; 686 686 687 if (isArray TypeWithLargeLength&& isOwnProperty)688 processProperties(o, arrayIndexPropertyNames(o, 100), isOwnProperty);687 if (isArrayLike && isOwnProperty) 688 processProperties(o, arrayIndexPropertyNames(o, Math.min(object.length, 100)), isOwnProperty); 689 689 else { 690 690 processProperties(o, Object.getOwnPropertyNames(o), isOwnProperty);
Note: See TracChangeset
for help on using the changeset viewer.