Bug 133711 - Web Inspector: Typebuilder should handle an Array of $ref type string with enum.
Summary: Web Inspector: Typebuilder should handle an Array of $ref type string with enum.
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 131596
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-10 18:35 PDT by James Craig
Modified: 2017-02-20 16:29 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Craig 2014-06-10 18:35:12 PDT
via JoePeck, Typebuilder should handle an Array of $ref type string with enum.

1. Recognize when an array has a $ref which is a string with enums. In such cases we should probably have an Array<String> instead of Array<Enum>
2. In such cases allow Array::addItem(Type::Enum) instead of Array::addItem(String) which under the hood does pushString(getWebEnumConstantValue(enumValue)).
3. For this to work, we may need something special like "EnumArray", or Array<T1, T2> where T1 is the storage, and T2 is the input.
Comment 1 Radar WebKit Bug Importer 2014-06-10 18:36:09 PDT
<rdar://problem/17262363>
Comment 2 James Craig 2014-06-10 18:38:23 PDT
Originally noticed when working on bug 130913.
Comment 3 Brian Burg 2014-06-27 14:30:59 PDT
As far as I remember, this is supported by the new code generator (if not from C++, at least in the JSON file). These issues are much harder to fix in the current generator because the ordering of enums, typedefs, etc is very fragile.