New issue
Advanced search Search tips

Issue 905449 link

Starred by 1 user

Issue metadata

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

Blocked on:
issue 905000



Sign in to add a comment

Enforce AllowShared extended attribute in Web IDL

Project Member Reported by kbr@chromium.org, Nov 14

Issue description

 Issue 905000  indicates that the AllowShared extended attribute in Chromium's Web IDL files isn't being honored. If it were, the call which used the FlexibleArrayBufferView extended attribute without AllowShared should have raised a DOMException in the bindings, before entering blink::WebGL2RenderingContextBase::uniform4fv .

binji, can you own this?

 
I think the issue here is the combination of FlexibleArrayBufferView and AllowShared flags, see the logic here: https://cs.chromium.org/chromium/src/third_party/blink/renderer/bindings/scripts/v8_types.py?type=cs&l=250

If FlexibleArrayBufferViews are always meant to be AllowShared, then maybe we should just check that here. Otherwise  we'll need to use the NonShared<> wrapper template with a FlexibleArrayBufferView type for these parameters.
Before https://chromium-review.googlesource.com/c/1334844 , FlexibleArrayBufferView was previously implying AllowShared. Was that intentional?

It would be OK to make that implicit; all uses of FlexibleArrayBufferView actually allow SharedArrayBuffer to be passed in.

Oops, sorry for delay in response. Sgtm either way: making it implicit or checking that we always have both. I guess it is more self-documenting for it to be explicit, though.

I'll work on CL for this.

Project Member

Comment 4 by bugdroid1@chromium.org, Nov 27

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

commit 8f5133db01a76dc2ccee87ed034241e5cdacc045
Author: Ben Smith <binji@chromium.org>
Date: Tue Nov 27 17:44:24 2018

Require AllowShared with FlexibleArrayBufferView

All methods that have a parameter with the FlexibleArrayBufferView
extended attribute support AllowShared. In other words, it is possible
to use them with an ArrayBufferView backed by an ArrayBuffer or a
SharedArrayBuffer. This CL makes this an explicit requirement in the IDL
file.

Currently only WebGL APIs use the FlexibleArrayBufferView extended
attribute.

Bug:  chromium:905449 
Change-Id: I52f23d4ee07c169a525243f00dd8a96a58ce7075
Reviewed-on: https://chromium-review.googlesource.com/c/1345125
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611175}
[modify] https://crrev.com/8f5133db01a76dc2ccee87ed034241e5cdacc045/third_party/blink/renderer/bindings/IDLExtendedAttributes.md
[modify] https://crrev.com/8f5133db01a76dc2ccee87ed034241e5cdacc045/third_party/blink/renderer/bindings/scripts/v8_types.py
[modify] https://crrev.com/8f5133db01a76dc2ccee87ed034241e5cdacc045/third_party/blink/renderer/bindings/tests/idls/core/test_object.idl

Status: Fixed (was: Assigned)
Thanks binji@ for picking this up.

Sign in to add a comment