Closed Bug 829248 Opened 7 years ago Closed 7 years ago
Implement support for [Treat
Undefined As=Missing] in Web IDL
I want this for add/removeEventListener.
Actually, I don't. But this is still useful!
Assignee: bzbarsky → nobody
No longer blocks: 829250
Hello there, My friend and I are interested in helping out. Is this bug still active? If so, where/how do we begin? Thanks.
This is still active, yes. Assuming you've pulled a Firefox tree, you want to look at dom/bindings/Codegen.py and read http://dev.w3.org/2006/webapi/WebIDL/#dfn-overload-resolution-algorithm I guess. Then start thinking about how to best implement it (probably by walking backwards through the arguments and changing argc as neeed up front in the generated code for method calls).
Cool! I assume this is part of a large(r) project overall, are there any other mentored bugs from this project that I could work on while we're at it? Thanks!
You can search bugzilla for mentored bugs, right?
I'm not familiar with the Implementation of WebIDL but can I take this bug and try to work on it?
Sure. Please feel free to ask questions as needed!
Assignee: nobody → joejoevictor
Can you confirm that you're still working on this bug?
methods, since it's not clear what that should really look like. This also does not require that [TreatUndefinedAs=Missing] on an argument force it on all later arguments, since it's not clear that we want that long-term.
Attachment #755016 - Flags: review?(khuey)
Stealing, because this is blocking people.
Whiteboard: [mentor=bz][lang=c++][lang=python] → [need review]
Comment on attachment 755016 [details] [diff] [review] Implement basic support for [TreatUndefinedAs=Missing] in WebIDL. does not add support for [TreatUndefinedAs=Missing] in overloaded Review of attachment 755016 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bindings/parser/WebIDL.py @@ +406,5 @@ > raise WebIDLError("[TreatUndefinedAs=Missing] is only " > "allowed on optional arguments", > [self.location]) > + else: > + if value == 'Null': Is there a reason not to just do elif and not have a separate level of control flow. I don't see one but it's possible I'm still too jetlagged to read code properly ...
Attachment #755016 - Flags: review?(khuey) → review+
You're totally right. I had the code looking a bit differently partway though writing the patch and then never reread it carefully enough... Fixed to do elif. https://hg.mozilla.org/integration/mozilla-inbound/rev/5f66c33dbf00
Whiteboard: [need review]
Target Milestone: --- → mozilla24
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.