Closed Bug 17013 Opened 26 years ago Closed 26 years ago

[ptr] native nsIFoo [without trailing paren] crashes xpidl

Categories

(Core :: XPCOM, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: mike+mozilla, Assigned: shaver)

Details

(Keywords: crash)

Attachments

(1 file)

Travis Bogard wrote: So to help you out with the crash. I found the problem in the IDL that was causing the crash. Changing the line that had the native ptr declaration... [ptr] native nsIPresContext; should be [ptr] native nsIPresContext(nsIPresContext); Travis
Attached file the offending example
Status: NEW → ASSIGNED
So it turns out that libIDL parses [ptr] native nsIFoo; quite happily, but xpidl gets null when it tries to access .user_type and crashes in fputs. Shaver, maybe you can help me out with the history some... 'native' is special to xpidl, correct? Is there any sense to libIDL accepting native nsIFoo; without an associated (nsIUserType) ? If no, we should flag this as invalid syntax in libIDL. I'll patch in something for now to catch it in xpidl. Also, do you know if andrewtv has a buzilla login?
Adding andrewtv, I hope.
Yay! Got your bugzilla ID right. Andrew, can you comment?
|native| is from OMG IDL, where it's unparameterized. We should flag it as an error, my bad that we don't already.
Ah. Yep, found it. Bottom of page 3-14 in the Corba v2.3 IDL grammar. Looks like adding a trailing (foo) is an xpidl innovation. I wonder if [ptr,id(nsIFoo)] native nsIFoo; would have been a cleaner extension.
Assignee: mccabe → shaver
Status: ASSIGNED → NEW
Fix sent to mccabe for review. (No, mccabe, that would have been ugly. =) )
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Fixed. Thanks, shaver.
Adding crash keyword
Keywords: crash
Component: xpidl → XPCOM
QA Contact: mike+mozilla → xpcom
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: