Bug 142512 - Bindings generator should create a C++ constant for each WebIDL constant
Summary: Bindings generator should create a C++ constant for each WebIDL constant
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Enhancement
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-03-09 16:00 PDT by Andy Estes
Modified: 2015-03-09 16:01 PDT (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 Andy Estes 2015-03-09 16:00:08 PDT
If I create a constant in IDL, such as:

interface MyInterface {
    const unsigned short myConstant = 0;
}

The generated bindings will add these to the prototype like this:

{ "myConstant", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0), (intptr_t) (0) },

But the JSMyInterface class will not have a myConstant, meaning that I might need to define my own in parallel with the IDL definition. It would be nice if C++ constants were generated automatically.
Comment 1 Radar WebKit Bug Importer 2015-03-09 16:01:43 PDT
<rdar://problem/20097938>