need support for a conditional interface map entry

RESOLVED FIXED

Status

()

Core
XPCOM
RESOLVED FIXED
16 years ago
16 years ago

People

(Reporter: Darin Fisher, Assigned: dougt)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

16 years ago
there's a number of conditional QI's out there that sort of take advantage of
the QI macros.  for example,

http://lxr.mozilla.org/seamonkey/source/netwerk/base/src/nsStandardURL.cpp#803
http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/viewsource/src/nsViewSourceChannel.cpp#53

it probably makes sense to come up with a macro for this.  how about
NS_INTERFACE_MAP_ENTRY_CONDITIONAL or NS_INTERFACE_MAP_CONDITIONAL_ENTRY?
(Assignee)

Comment 1

16 years ago
Created attachment 102012 [details] [diff] [review]
proposed patch v.1

yeah, I think it is a good idea.
(Assignee)

Comment 2

16 years ago
hmm.  Condition first.  new patch coming up.
(Assignee)

Comment 3

16 years ago
Created attachment 102014 [details] [diff] [review]
number 2
(Assignee)

Updated

16 years ago
Attachment #102012 - Attachment is obsolete: true
> +    NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIURL, mSupportsFileURL)

nsIFileURL you mean?

Also, could you thwack nsViewSourceChannel too, while you're doing this?
(Assignee)

Comment 5

16 years ago
Created attachment 102016 [details] [diff] [review]
three three three

Just checking to see if you were awake! :-)
Attachment #102014 - Attachment is obsolete: true
Comment on attachment 102016 [details] [diff] [review]
three three three

r/sr=bzbarsky.	Being awake is overrated.  ;)
Attachment #102016 - Flags: superreview+
(Assignee)

Comment 7

16 years ago
especially when the reviewers are awake!  thanks.
(Reporter)

Comment 8

16 years ago
Comment on attachment 102016 [details] [diff] [review]
three three three

>     // see nsStandardURL::Equals
>     if (aIID.Equals(kThisImplCID))
>         foundInterface = NS_STATIC_CAST(nsIURI *, this);
>     else
> NS_INTERFACE_MAP_END

grr... so i guess it doesn't solve this one.  oh well :(

r/sr=darin
Attachment #102016 - Flags: review+
(Assignee)

Comment 9

16 years ago
Checking in xpcom/glue/nsISupportsImpl.h;
/cvsroot/mozilla/xpcom/glue/nsISupportsImpl.h,v  <--  nsISupportsImpl.h
new revision: 3.18; previous revision: 3.17
done
Checking in netwerk/base/src/nsStandardURL.cpp;
/cvsroot/mozilla/netwerk/base/src/nsStandardURL.cpp,v  <--  nsStandardURL.cpp
new revision: 1.39; previous revision: 1.38
done
Checking in netwerk/protocol/viewsource/src/nsViewSourceChannel.cpp;
/cvsroot/mozilla/netwerk/protocol/viewsource/src/nsViewSourceChannel.cpp,v  <--
 nsViewSourceChannel.cpp
new revision: 1.15; previous revision: 1.14
done

thanks
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.