Last Comment Bug 785472 - The Web IDL parser should not allow inheriting from an interface that is only forward declared
: The Web IDL parser should not allow inheriting from an interface that is only...
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: x86 Mac OS X
-- normal (vote)
: mozilla17
Assigned To: :Ehsan Akhgari
: Andrew Overholt [:overholt]
Depends on:
  Show dependency treegraph
Reported: 2012-08-24 12:24 PDT by :Ehsan Akhgari
Modified: 2012-08-24 20:00 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (v1) (1.79 KB, patch)
2012-08-24 12:24 PDT, :Ehsan Akhgari
khuey: review+
Details | Diff | Splinter Review

Description User image :Ehsan Akhgari 2012-08-24 12:24:08 PDT

Comment 1 User image :Ehsan Akhgari 2012-08-24 12:24:38 PDT
Created attachment 655093 [details] [diff] [review]
Patch (v1)
Comment 2 User image Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-08-24 12:27:21 PDT
Comment on attachment 655093 [details] [diff] [review]
Patch (v1)

Review of attachment 655093 [details] [diff] [review]:

::: dom/bindings/parser/
@@ +426,5 @@
> +            raise WebIDLError("%s inherits from %s which does not have "
> +                              "a definition" %
> +                              (,
> +                     ,
> +                              [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!
Comment 4 User image :Ehsan Akhgari 2012-08-24 13:24:36 PDT
I backed this out since it breaks the build with the existing IDL files:

Traceback (most recent call last):
  File "/media/storage/moz/mozilla-inbound/config/", line 56, in <module>
  File "/media/storage/moz/mozilla-inbound/config/", line 48, in main
    execfile(script, frozenglobals)
  File "/media/storage/moz/mozilla-inbound/dom/bindings/", line 80, in <module>
  File "/media/storage/moz/mozilla-inbound/dom/bindings/", line 59, in main
    parserResults = parser.finish()
  File "/media/storage/moz/mozilla-inbound/dom/bindings/parser/", line 3667, in finish
  File "/media/storage/moz/mozilla-inbound/dom/bindings/parser/", line 430, in finish
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...
Comment 5 User image :Ehsan Akhgari 2012-08-24 13:35:11 PDT
I got the condition wrong!  Re-landed with it fixed:
Comment 6 User image Ryan VanderMeulen [:RyanVM] 2012-08-24 20:00:20 PDT

Note You need to log in before you can comment on or make changes to this bug.