Implement @@iterator on URLSearchParams |
|||||
Issue descriptionTests: https://w3c-test.org/url/interfaces.any.html https://w3c-test.org/url/interfaces.any.worker.html (There's also some missing features, but I think those got bugs already.)
,
May 18 2017
So the problems are - toJSON - sort - @@iterator , right?
,
May 18 2017
I think I already filed bugs for the first two, so I'd use this one for the third problem, which is why I filed this in Bindings, not Network.
,
May 18 2017
I didn't see a bug for toJSON, so I filed one: issue 723954 . Issue 682143 is for sort. I'm changing this issue's title.
,
May 18 2017
,
May 18 2017
@@iterator is already implemented in our IDL file, it's just the way we implement pair iterators that's failing idlharness.js. Namely, our issue is https://heycam.github.io/webidl/#es-iterable-entries ("If the interface has a pair iterator, then the Function object is the value of the @@iterator property"), as at the moment we produce different functions for entries() and @@iterator in the generated bindings code.
,
May 18 2017
,
May 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1bd6e150922b18cd1fa5e0f14482ecf691ba3377 commit 1bd6e150922b18cd1fa5e0f14482ecf691ba3377 Author: raphael.kubo.da.costa <raphael.kubo.da.costa@intel.com> Date: Mon May 22 12:48:38 2017 bindings: Use an alias for @@iterator in certain declarations. So far, the generated bindings had completely separate methods for entries(), values() and the @@iterator symbol, all of which were added automatically if an IDL has an iterable<>, maplike<> or setlike<> declaration. However, the WebIDL spec states that: * Pair iterators (iterable<K,V>) and maplike declarations (maplike<K,V>) should add the same Function object for both @@iterator and entries(), and its name attribute should be "entries". * Setlike declarations (setlike<V>) should add the same Function object for both @@iterator and values(), and its name attribute should be "values". Fix it by adding SymbolKeyedMethodConfiguration::symbol_alias, an optional string that can be used to add the same function template as both a symbol as well as this string (which will also be used as the Function object's name attribute). While here, bring back a simpler version of the ValueIterable class removed in commit c85bc0151 ("bindings: Make some value iterator properties aliases to Array.prototype functions") and call it SetlikeIterable instead. As the name suggests, we need it for interfaces with setlike declarations instead of "iterable<V>" declarations: the latter uses the definitions from %ArrayPrototype%, while the former do not. SetlikeIterable is currently used by FontFaceSet, which is our only IDL with a setlike declaration and whose C++ implementation was previously inheriting from PairIterable, leading @@iterator to call entriesForBinding() instead of valuesForBinding() instead. BUG= 723648 R=bashi@chromium.org,haraken@chromium.org,yukishiino@chromium.org Review-Url: https://codereview.chromium.org/2891063003 Cr-Commit-Position: refs/heads/master@{#473558} [delete] https://crrev.com/fb7b20e38b88a3418e6c6325e1e3d99b8a3e857d/third_party/WebKit/LayoutTests/external/wpt/fetch/api/headers/headers-idl-expected.txt [modify] https://crrev.com/1bd6e150922b18cd1fa5e0f14482ecf691ba3377/third_party/WebKit/Source/bindings/core/v8/Iterable.h [modify] https://crrev.com/1bd6e150922b18cd1fa5e0f14482ecf691ba3377/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp [modify] https://crrev.com/1bd6e150922b18cd1fa5e0f14482ecf691ba3377/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h [modify] https://crrev.com/1bd6e150922b18cd1fa5e0f14482ecf691ba3377/third_party/WebKit/Source/bindings/scripts/v8_interface.py [modify] https://crrev.com/1bd6e150922b18cd1fa5e0f14482ecf691ba3377/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl [modify] https://crrev.com/1bd6e150922b18cd1fa5e0f14482ecf691ba3377/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp [modify] https://crrev.com/1bd6e150922b18cd1fa5e0f14482ecf691ba3377/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.h [modify] https://crrev.com/1bd6e150922b18cd1fa5e0f14482ecf691ba3377/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp [modify] https://crrev.com/1bd6e150922b18cd1fa5e0f14482ecf691ba3377/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.h [modify] https://crrev.com/1bd6e150922b18cd1fa5e0f14482ecf691ba3377/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp [modify] https://crrev.com/1bd6e150922b18cd1fa5e0f14482ecf691ba3377/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.h [modify] https://crrev.com/1bd6e150922b18cd1fa5e0f14482ecf691ba3377/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp [modify] https://crrev.com/1bd6e150922b18cd1fa5e0f14482ecf691ba3377/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h [modify] https://crrev.com/1bd6e150922b18cd1fa5e0f14482ecf691ba3377/third_party/WebKit/Source/core/css/FontFaceSet.h
,
May 22 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by phistuck@chromium.org
, May 17 2017Labels: OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)