"length" attribute with [ImplementedAs] breaks indexed property getters |
||
Issue descriptionWhen working on an IDL interface that supports indexed properties (ie. they have an integer-typed "length" attribute and an indexed getter), doing something like this: [ImplementedAs=size] readonly attribute unsigned long length; breaks the generated bindings code. The generated "lengthAttributeGetter()" works fine and calls impl->size(), but "indexedPropertyGetter()" still calls impl->length(), which breaks the build.
,
Feb 10 2017
I'm fine with no supporting [ImplementedAs=] in this case, this actually came up while I was working on https://codereview.chromium.org/2683853005/, as both core/css/cssom/CSSUnparsedValue.h and core/css/cssom/CSSTransformValue.h used size() and I wanted to change as little as possible in those classes to make the respective IDLs compliant. Is the current situation OK, or does it at least make sense to throw an error in the code generator if one tries to use [ImplementedAs=] with length (I guess all other attribute names should be fine)?
,
Feb 13 2017
I think the current situation is acceptably okay. If you want, it's okay, too, to add the test to throw an error.
,
Mar 2 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by yukishiino@chromium.org
, Feb 10 2017