The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla17

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

Trunk
mozilla17
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Comment 1

5 years ago
Created attachment 655093 [details] [diff] [review]
Patch (v1)
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+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/1142882b6c0b
Target Milestone: --- → mozilla17
(Assignee)

Comment 4

5 years ago
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...
(Assignee)

Comment 5

5 years ago
I got the condition wrong!  Re-landed with it fixed:

https://hg.mozilla.org/integration/mozilla-inbound/rev/68a243c559b2
https://hg.mozilla.org/mozilla-central/rev/68a243c559b2
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.