Closed Bug 338865 Opened 16 years ago Closed 5 years ago

Scriptable iface inheriting from noscript iface should throw error

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: jhpedemonte, Assigned: mccr8)

References

Details

Attachments

(1 file, 1 obsolete file)

Currently, XPIDL prints a warning whenever a scriptable interface inherits from a non-scriptable interface.  These are the three that I have run into:

./imgIDecoderObserver.idl:96: Warning: imgIDecoderObserver is scriptable but
inherits from the non-scriptable interface imgIContainerObserver

./nsIScriptSecurityManager.idl:277: Warning: nsIScriptSecurityManager is
scriptable but inherits from the non-scriptable interface nsIXPCSecurityManager

./nsIWindowCreator2.idl:93: Warning: nsIWindowCreator2 is scriptable but
inherits from the non-scriptable interface nsIWindowCreator

Since a scriptable interface inheriting from a non-scriptable interface doesn't make much sense, bz suggested that this warning be turned into a hard error.
Attached patch patch (obsolete) — Splinter Review
Assignee: dbradley → jhpedemonte
Status: NEW → ASSIGNED
Flags: blocking1.9a2?
Attachment #222908 - Flags: review?(shaver)
Comment on attachment 222908 [details] [diff] [review]
patch

Does this patch break anything in the current trunk?
We shouldn't check it in until we fix the existing abuses, of course (and yes, there are some in current trunk).
Flags: blocking1.9a2? → blocking1.9+
WOuld like to get this, but we don't have traction and this isn't new, by any means.
Flags: blocking1.9+ → blocking1.9-
Whiteboard: [wanted-1.9]
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Component: xpidl → XPCOM
QA Contact: pschwartau → xpcom
Assignee: jhpedemonte → continuation
Depends on: 1216885
Comment on attachment 222908 [details] [diff] [review]
patch

This patch does not apply any more because the XPIDL compiler is now written in Python instead of C. ;)
Attachment #222908 - Attachment is obsolete: true
With bug 1216885 fixed, making this a fatal error passes in a local build.
Comment on attachment 8907315 [details]
Bug 338865 - Scriptable XPIDL iface inheriting from noscript iface should throw error.

https://reviewboard.mozilla.org/r/178986/#review184384

Does this build successfully?  I recall seeing this error before somewhere around nsIDOMSelection, but perhaps we've cleaned up that code by now...
Attachment #8907315 - Flags: review?(nfroyd) → review+
(In reply to Nathan Froyd [:froydnj] from comment #8)
> Comment on attachment 8907315 [details]
> Bug 338865 - Scriptable XPIDL iface inheriting from noscript iface should
> throw error.
> 
> https://reviewboard.mozilla.org/r/178986/#review184384
> 
> Does this build successfully?  I recall seeing this error before somewhere
> around nsIDOMSelection, but perhaps we've cleaned up that code by now...

nsIDOMSelection doesn't exist. There was a problem with nsISelectionPrivate, but I just fixed it in bug 1216885.
Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f636dde157b8
Scriptable XPIDL iface inheriting from noscript iface should throw error. r=froydnj
https://hg.mozilla.org/mozilla-central/rev/f636dde157b8
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.