New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 723648 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
OoO until Feb 4th
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 3
Type: Feature



Sign in to add a comment

Implement @@iterator on URLSearchParams

Project Member Reported by annevank...@gmail.com, May 17 2017

Issue description

Tests:

  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.)
 
Components: Blink>Network
Labels: OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
So the problems are

 - toJSON
 - sort
 - @@iterator

, right?
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.
Status: Available (was: Untriaged)
Summary: Implement @@iterator on URLSearchParams (was: URLSearchParams binding slightly wrong)
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.
Labels: -Type-Bug Type-Feature
@@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.
Owner: raphael....@intel.com
Status: Started (was: Available)
Project Member

Comment 8 by bugdroid1@chromium.org, 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

Labels: M-60
Status: Fixed (was: Started)

Sign in to add a comment