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

Issue 672978 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 650150


Participants' hotlists:
Hotlist-Bindings-IDLCompiler


Sign in to add a comment

Putting a subset of constructors behind a runtime enabled flag in IDL file

Project Member Reported by zakerinasab@chromium.org, Dec 9 2016

Issue description

When adding new features to Chrome, sometimes it is needed to add new constructors to the IDL file but keep them behind a flag to not expose the experimental features. Currently, it seems that IDL does not allow this.

A use case is as follows:
- For ImageData, we have [Constructor(unsigned long sw, unsigned long sh),]
- We want to add [Constructor(unsigned long sw, unsigned long sh, ImageDataColorSpace colorSpace),]
- We want the new constructor to be behind ExperimentalCanvasFeatures runtime enabled flag.

This is not a blocking bug, but the current solution we have found is to replace the new XXX constructors with createXXX methods. This forces us to come back to the code and layout tests and fix all the function calls before removing the experimental flag and shipping the feature.
 

Comment 1 Deleted

Owner: bashi@chromium.org
Status: Assigned (was: Untriaged)

Comment 3 by bashi@chromium.org, Jun 1 2017

Cc: bashi@chromium.org
Owner: peria@chromium.org
Looks similar to https://groups.google.com/a/chromium.org/forum/?utm_medium=email&utm_source=footer#!msg/blink-dev/WkNcwh6aISA/3SeSuSICBwAJ

Probably we can use [Expose=(Window ExperimentalCanvasFeatures)] ?

Assigning to peria@ as he is looking at this kind of issue.

Comment 4 by peria@chromium.org, Nov 20 2017

Blockedon: 650150

Comment 5 by peria@chromium.org, May 3 2018

Blockedon: 839389

Comment 6 by peria@chromium.org, May 25 2018

Blockedon: -839389
Labels: Hotlist-Bindings-IDLCompiler
Cc: -junov@chromium.org
Note for myself;
One idea for this issue is to introduce a new Blink specific extended attribute [Construct] that is applicable to operations, and define such non-standard constructors on Global interfaces.

For example, for the case of #0,
// we have no changes in image_data.idl
[
  Constructor(unsigned long sw, unsigned long sh),
  Exposed=(Window, Worker)
] ImageData { ... };

partial interface mixin WindowOrWorker {
  [Construct, RuntimeEanbled=ExperimentalCanvasFeatures] ImageData(unsigned long sw, unsigned long sh, ImageDataColorSpace colorSpace);
};

Sign in to add a comment