Closed
Bug 764398
Opened 13 years ago
Closed 13 years ago
Implement enum as dictionary member for WebIDL
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: wchen, Unassigned)
References
Details
Code generation fails if we have an enum type as a dictionary member.
Example (from http://dvcs.w3.org/hg/notifications/raw-file/tip/Overview.html#api):
dictionary NotificationOptions {
NotificationDirection titleDir;
DOMString body;
NotificationDirection bodyDir;
DOMString tag;
DOMString iconUrl;
};
enum NotificationDirection {
"auto",
"ltr",
"rtl"
};
Comment 1•13 years ago
|
||
The actual error William is seeing:
File "/Users/wchen/mozilla/dom/bindings/Codegen.py", line 1704, in
getJSToNativeConversionTemplate
if type.isAny():
File "/Users/wchen/mozilla/dom/bindings/parser/WebIDL.py", line 778, in isAny
return self.tag() == IDLType.Tags.any
File "/Users/wchen/mozilla/dom/bindings/parser/WebIDL.py", line 791, in tag
assert False # Override me!
This is due to dictionaries not calling complete() on their member types, which causes the type here to be an IDLUnresolvedType instead of an IDLWrapperType for a dictionary.
The patch in bug 763911 fixes that, and in my tree with that patch this works.
Depends on: 763911
Comment 2•13 years ago
|
||
er, I meant IDLWrapperType for an enum.
Comment 3•13 years ago
|
||
Is this fixed? If so, should this be a dupe of bug 763911?
Comment 4•13 years ago
|
||
Yeah, this is fixed. We have a test for this in TestCodeGen.webidl.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•