Closed Bug 172833 Opened 22 years ago Closed 22 years ago

need support for a conditional interface map entry

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: darin.moz, Assigned: dougt)

References

()

Details

Attachments

(1 file, 2 obsolete files)

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?
Attached patch proposed patch v.1 (obsolete) — Splinter Review
yeah, I think it is a good idea.
hmm.  Condition first.  new patch coming up.
Attached patch number 2 (obsolete) — Splinter Review
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?
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+
especially when the reviewers are awake!  thanks.
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+
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
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: