New issue
Advanced search Search tips

Issue 904326 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 15
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

WebIDL's Exposed= attribute should allow whitespaces between values

Project Member Reported by nhiroki@chromium.org, Nov 12

Issue description

See the following CL for an example. This CL attempts to expose 'new Worker()' to DedicatedWorkerGlobalScope without a runtime flag:
https://chromium-review.googlesource.com/c/chromium/src/+/1325596

Exposed=(Window,DedicatedWorker) exposes a feature to both Window and DedicatedWorkerGlobalScope (see the patchset 2 of the CL), but Exposed=(Window, DedicatedWorker) exposes the feature only to Window (see the patchset 1 of the CL).
 
Description: Show this description

Comment 2 Deleted

IDL parser looks working correctly (https://cs.chromium.org/chromium/src/tools/idl_parser/test_parser/interface_web.idl?l=641)
However, generate_global_constructors.py gets a wrong result from utilities.get_interface_extended_attributes_from_idl.

Expected:
  {'Exposed': '(Window, DedicatedWorker)' }
Actual
  {'Exposed': '(Window' }
Hmm, this part does not depend on idl_parser, and parses IDL files directly.
It also has a FIXME comment for this issue.
https://cs.chromium.org/chromium/src/third_party/blink/renderer/bindings/scripts/utilities.py?l=383
Components: -Blink>Workers
Status: Started (was: Assigned)
peria@ has a CL (thank you!):
https://chromium-review.googlesource.com/c/chromium/src/+/1331292

Project Member

Comment 6 by bugdroid1@chromium.org, Nov 15

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/13f7b176e1e45569f9cb96454bfd5ee676810355

commit 13f7b176e1e45569f9cb96454bfd5ee676810355
Author: Hitoshi Yoshida <peria@chromium.org>
Date: Thu Nov 15 02:59:38 2018

IDL Compiler: Accept ', ' to split Exposed values

IDL compiler did not work for cases that have multiple
values separated with ', '.
For example, we couldn't specify "Exposed=(Window, Worker)".

This CL fixes for Exposed cases, thus we will be possible to
use "Expose=(Window, Worker)".
This change works only for Expose attributes, because it is
handled separately, and it would be a huge change if we work
for general cases.


Bug:  904326 
Change-Id: I33bc09d96c1dd1afdd29850300add30687fa9d3b
Reviewed-on: https://chromium-review.googlesource.com/c/1331292
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608238}
[modify] https://crrev.com/13f7b176e1e45569f9cb96454bfd5ee676810355/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/13f7b176e1e45569f9cb96454bfd5ee676810355/third_party/WebKit/LayoutTests/http/tests/worklet/webexposed/global-interface-listing-paint-worklet-expected.txt
[modify] https://crrev.com/13f7b176e1e45569f9cb96454bfd5ee676810355/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/13f7b176e1e45569f9cb96454bfd5ee676810355/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/13f7b176e1e45569f9cb96454bfd5ee676810355/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/13f7b176e1e45569f9cb96454bfd5ee676810355/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/13f7b176e1e45569f9cb96454bfd5ee676810355/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/13f7b176e1e45569f9cb96454bfd5ee676810355/third_party/blink/renderer/bindings/scripts/compute_global_objects.py
[modify] https://crrev.com/13f7b176e1e45569f9cb96454bfd5ee676810355/third_party/blink/renderer/bindings/scripts/generate_global_constructors.py
[modify] https://crrev.com/13f7b176e1e45569f9cb96454bfd5ee676810355/third_party/blink/renderer/bindings/scripts/utilities.py

Status: Fixed (was: Started)
The change in #6 should fix also some related (not found) issues.
Allowing ", " in Exposed and Global, and fix parse error with annotated types in constructors.

Sign in to add a comment