Changeset 202583 in webkit
- Timestamp:
- Jun 28, 2016 1:19:01 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202579 r202583 1 2016-06-28 Youenn Fablet <youenn@apple.com> 2 3 Iterable interfaces should have their related prototype @@iterator property writable 4 https://bugs.webkit.org/show_bug.cgi?id=159211 5 6 Reviewed by Chris Dumez. 7 8 * fast/dom/nodeListIterator-expected.txt: 9 * fast/dom/nodeListIterator.html: Overriding NodeList @@iterator by Array one and checking everything is fine. 10 1 11 2016-06-28 Jer Noble <jer.noble@apple.com> 2 12 -
trunk/LayoutTests/fast/dom/nodeListIterator-expected.txt
r202334 r202583 39 39 PASS end.done is true 40 40 PASS end.value is undefined 41 PASS descriptor.configurable is true 42 PASS descriptor.writable is true 43 PASS descriptor.enumerable is false 44 PASS NodeList.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; did not throw exception. 45 PASS a instanceof Node is true 46 PASS a instanceof Node is true 47 PASS a instanceof Node is true 48 PASS a instanceof Node is true 49 PASS counter is 4 41 50 PASS successfullyParsed is true 42 51 -
trunk/LayoutTests/fast/dom/nodeListIterator.html
r202334 r202583 88 88 checkEndIterator(iterator.next()); 89 89 90 var descriptor = Object.getOwnPropertyDescriptor(NodeList.prototype, Symbol.iterator); 91 shouldBeTrue('descriptor.configurable'); 92 shouldBeTrue('descriptor.writable'); 93 shouldBeFalse('descriptor.enumerable'); 94 95 shouldNotThrow('NodeList.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];'); 96 var counter = 0; 97 for (var a of nodeList) { 98 shouldBeTrue('a instanceof Node'); 99 counter++; 100 } 101 shouldBe('counter', '4'); 90 102 </script> 91 103 <script src="../../resources/js-test-post.js"></script> -
trunk/Source/WebCore/ChangeLog
r202582 r202583 1 2016-06-28 Youenn Fablet <youenn@apple.com> 2 3 Iterable interfaces should have their related prototype @@iterator property writable 4 https://bugs.webkit.org/show_bug.cgi?id=159211 5 <rdar://problem/26950766> 6 7 Reviewed by Chris Dumez. 8 9 Updating @@iterator property according http://heycam.github.io/webidl/#es-iterator. 10 11 Covered by updated test. 12 13 * bindings/scripts/CodeGeneratorJS.pm: 14 (GenerateImplementation): Removing ReadOnly flag from @@iterator property of iterable interfaces. 15 * bindings/scripts/test/JS/JSTestNode.cpp: 16 (WebCore::JSTestNodePrototype::finishCreation): Rebasing expectation. 17 * bindings/scripts/test/JS/JSTestObj.cpp: 18 (WebCore::JSTestObjPrototype::finishCreation): Ditto. 19 1 20 2016-06-28 Anders Carlsson <andersca@apple.com> 2 21 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r202551 r202583 2311 2311 if ($interface->iterable) { 2312 2312 my $functionName = GetFunctionName($interface, $className, @{$interface->iterable->functions}[0]); 2313 push(@implContent, " putDirect(vm, vm.propertyNames->iteratorSymbol, JSFunction::create(vm, globalObject(), 0, ASCIILiteral(\"[Symbol.Iterator]\"), $functionName), ReadOnly |DontEnum);\n");2313 push(@implContent, " putDirect(vm, vm.propertyNames->iteratorSymbol, JSFunction::create(vm, globalObject(), 0, ASCIILiteral(\"[Symbol.Iterator]\"), $functionName), DontEnum);\n"); 2314 2314 } 2315 2315 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
r202307 r202583 116 116 Base::finishCreation(vm); 117 117 reifyStaticProperties(vm, JSTestNodePrototypeTableValues, *this); 118 putDirect(vm, vm.propertyNames->iteratorSymbol, JSFunction::create(vm, globalObject(), 0, ASCIILiteral("[Symbol.Iterator]"), jsTestNodePrototypeFunctionSymbolIterator), ReadOnly |DontEnum);118 putDirect(vm, vm.propertyNames->iteratorSymbol, JSFunction::create(vm, globalObject(), 0, ASCIILiteral("[Symbol.Iterator]"), jsTestNodePrototypeFunctionSymbolIterator), DontEnum); 119 119 } 120 120 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r202307 r202583 1328 1328 putDirect(vm, clientData.builtinNames().privateMethodPrivateName(), JSFunction::create(vm, globalObject(), 0, String(), jsTestObjPrototypeFunctionPrivateMethod), ReadOnly | DontEnum); 1329 1329 putDirect(vm, clientData.builtinNames().publicAndPrivateMethodPrivateName(), JSFunction::create(vm, globalObject(), 0, String(), jsTestObjPrototypeFunctionPublicAndPrivateMethod), ReadOnly | DontEnum); 1330 putDirect(vm, vm.propertyNames->iteratorSymbol, JSFunction::create(vm, globalObject(), 0, ASCIILiteral("[Symbol.Iterator]"), jsTestObjPrototypeFunctionSymbolIterator), ReadOnly |DontEnum);1330 putDirect(vm, vm.propertyNames->iteratorSymbol, JSFunction::create(vm, globalObject(), 0, ASCIILiteral("[Symbol.Iterator]"), jsTestObjPrototypeFunctionSymbolIterator), DontEnum); 1331 1331 } 1332 1332
Note: See TracChangeset
for help on using the changeset viewer.