Closed Bug 785472 Opened 13 years ago Closed 13 years ago

The Web IDL parser should not allow inheriting from an interface that is only forward declared

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

Details

Attachments

(1 file)

No description provided.
Attached patch Patch (v1)Splinter Review
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #655093 - Flags: review?(khuey)
Comment on attachment 655093 [details] [diff] [review] Patch (v1) Review of attachment 655093 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bindings/parser/WebIDL.py @@ +426,5 @@ > + raise WebIDLError("%s inherits from %s which does not have " > + "a definition" % > + (self.identifier.name, > + self.parent.identifier.name), > + [self.location]) I would prefer if parent and isinstance(parent, IDLExternalInterface): raise ... assert not parent or isinstance(parent, IDLInterface). If parent somehow becomes an IDLAttribute I want to know!
Attachment #655093 - Flags: review?(khuey) → review+
I backed this out since it breaks the build with the existing IDL files: https://hg.mozilla.org/integration/mozilla-inbound/rev/1bc0e4eac6e5 Traceback (most recent call last): File "/media/storage/moz/mozilla-inbound/config/pythonpath.py", line 56, in <module> main(sys.argv[1:]) File "/media/storage/moz/mozilla-inbound/config/pythonpath.py", line 48, in main execfile(script, frozenglobals) File "/media/storage/moz/mozilla-inbound/dom/bindings/GlobalGen.py", line 80, in <module> main() File "/media/storage/moz/mozilla-inbound/dom/bindings/GlobalGen.py", line 59, in main parserResults = parser.finish() File "/media/storage/moz/mozilla-inbound/dom/bindings/parser/WebIDL.py", line 3667, in finish nsIDOMFileRequest.idl production.finish(self.globalScope()) File "/media/storage/moz/mozilla-inbound/dom/bindings/parser/WebIDL.py", line 430, in finish [self.location]) WebIDL.WebIDLError: error: XMLHttpRequest inherits from XMLHttpRequestEventTarget which does not have a definition, XMLHttpRequest.webidl line 55:0 interface XMLHttpRequest : XMLHttpRequestEventTarget { ^ Not sure how we're supposed to fix those...
I got the condition wrong! Re-landed with it fixed: https://hg.mozilla.org/integration/mozilla-inbound/rev/68a243c559b2
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: