Closed Bug 11454 Opened 21 years ago Closed 21 years ago

xpidl doesn't respect [noscript] for attributes

Categories

(Core :: XPCOM, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: mike+mozilla, Assigned: mike+mozilla)

References

Details

Attachments

(1 file, 2 obsolete files)

Given idl with a line such as

    [noscript] attribute string dummy;

xpidl won't generate 'hidden' bits for the accessor methods in the .xpt file,
and XPConnect will happily access the attribute.  This turned up because
somebody has an 'attribute voidStar foo' in their .idl file, and we'd like to
apply the same requirement that it be marked [noscript] that interface methods
will soon have.  (When I check in...)

/mailnews/base/search/public/nsIMsgSearchSession.idl has
     readonly attribute voidStar searchParam;
Status: NEW → ASSIGNED
Marking as assigned.

A logical extension of the [noscript] error recently checked in.
*** Bug 12187 has been marked as a duplicate of this bug. ***
I need to fix nsISupportsPrimitives.idl when I fix this.
Fix checked in.  Still in question is whether xpidl_typelib generates the 'don't
script me' bits, which I'm not sure about.  Leaving open for now.
So far so good. xpt_dump shows that the 'hidden' bit is not being set. This is 
worth fixing. It looks like typelib_attr_accessor is the place to set it. 
typelib_op_dcl has a fine example of how. You just have to get the 
"noscript" prop from a IDL_ATTR_DCL instead of a IDL_OP_DCL. and set 
XPT_MD_HIDDEN or not. We know that attributes can't be XPT_MD_NOTXPCOM.

You've already done the hard part of fixing up the idl files in the tree.
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Attached patch change nsISupportsVoid (obsolete) — Splinter Review
Attached patch fix caller (obsolete) — Splinter Review
Attachment #76244 - Attachment description: patch → change nsISupportsVoid
Attachment #76251 - Attachment description: patch → fix caller
Comment on attachment 76244 [details] [diff] [review]
change nsISupportsVoid

r=dougt
Attachment #76244 - Flags: review+
Attachment #76244 - Attachment is obsolete: true
Comment on attachment 76251 [details] [diff] [review]
fix caller

moved to bug 133657
Attachment #76251 - Attachment is obsolete: true
Component: xpidl → XPCOM
QA Contact: mike+mozilla → xpcom
You need to log in before you can comment on or make changes to this bug.