Scriptable iface inheriting from noscript iface should throw error

RESOLVED FIXED in Firefox 57

Status

()

defect
RESOLVED FIXED
13 years ago
2 years ago

People

(Reporter: jhpedemonte, Assigned: mccr8)

Tracking

Trunk
mozilla57
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.9 -
wanted1.9 +

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Reporter

Description

13 years ago
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.
Reporter

Comment 1

13 years ago
Posted patch patch (obsolete) — Splinter Review
Assignee: dbradley → jhpedemonte
Status: NEW → ASSIGNED
Reporter

Updated

13 years ago
Flags: blocking1.9a2?
Reporter

Updated

13 years ago
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]

Updated

11 years ago
Component: xpidl → XPCOM
QA Contact: pschwartau → xpcom
Assignee

Updated

2 years ago
Assignee: jhpedemonte → continuation
Assignee

Updated

2 years ago
Depends on: 1216885
Assignee

Comment 5

2 years ago
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
Assignee

Comment 6

2 years ago
With bug 1216885 fixed, making this a fatal error passes in a local build.

Comment 8

2 years ago
mozreview-review
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+
Assignee

Comment 9

2 years ago
(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.

Comment 10

2 years ago
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: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.