Closed
Bug 764277
Opened 12 years ago
Closed 12 years ago
New DOM bindings codegen doesn't register classes with constructors
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: jst, Assigned: peterv)
References
Details
Attachments
(1 file, 2 obsolete files)
15.45 KB,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
When we do codegen for a webidl interface that has a constructor we don't generate code that actually registers that interface as a global constructor with the DOM code, which means the codegen alone doesn't make a constructable interface constructable in JS. This stuff happens to work for existing classes, where we already have old bindings that trigger the registration of the constructors, but for new types, we need more. I hacked up a patch that makes this work, but it's not right, nor pretty. But it's enough to get Bonnie unblocked in bug 764234. The attached patch ends up working, but it registers classes that don't have constructors as well as ones that do, so someone who understands the WebIDL parser, dom binding config guts, and the code generator better than I do (hi peter :) should write an appropriate fix here.
Comment 1•12 years ago
|
||
Note bug 764234 comment 1.
Comment 2•12 years ago
|
||
And in particular, we _do_ want to register things that don't have constructors, as long as they have interface objects.
Reporter | ||
Comment 3•12 years ago
|
||
Cc:ing William too in case this matters for his work on notifications...
Assignee | ||
Comment 4•12 years ago
|
||
Just nullchecking on hash-insertion means we'll have to check for the uninitialized type in DOMCI, which seems wrong. This adds an overwritable eTypeNewDOMBinding type. Still needs testing.
Attachment #632566 -
Attachment is obsolete: true
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #633136 -
Attachment is obsolete: true
Attachment #633141 -
Flags: review?(jst)
Reporter | ||
Updated•12 years ago
|
Attachment #633141 -
Flags: review?(jst) → review+
Assignee | ||
Comment 6•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/bef4bf064981
Target Milestone: --- → mozilla16
Comment 7•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/bef4bf064981
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•