Closed
Bug 72111
Opened 24 years ago
Closed 23 years ago
fall back on nsILoadGroup when nsIChannel has no nsIPrompt
Categories
(Core Graveyard :: Embedding: APIs, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.9
People
(Reporter: jud, Assigned: badami)
References
Details
(Keywords: embed, Whiteboard: [patch needs r/sr=])
Attachments
(2 files)
2.91 KB,
patch
|
Details | Diff | Splinter Review | |
2.09 KB,
patch
|
bbaetz
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
Per the api review meeting today we're going to continue to have the nsIPrompt
accessible via the notification callbacks hanging of of nsIChannel, but we also
need it to be an attribute off of nsILoadGroup.
Reporter | ||
Updated•24 years ago
|
Reporter | ||
Comment 1•24 years ago
|
||
nsILoadGroup is about to freeze. I don't have this in our notes for api review.
why do we need nsIPrompt hanging off the load group? the callbacks aren't enough?
Comment 2•24 years ago
|
||
there are no notificationCallbacks on nsILoadGroup... given a nsILoadGroup, one
would have to get the defaultLoadRequest, QI it to a nsIChannel, then get the
notificationCallbacks from the nsIChannel, and then call GetInterface on the
notificationCallbacks to get a nsIPrompt.
obviously, this would fail if the defaultLoadRequest did not implement
nsIChannel. so, is this good enough? or, do people need to be able to
associate notificationCallbacks more directly with a loadGroup?
Summary: nsIPrompt needs to be an attribute of nsILoadGroup → fall back on nsILoadGroup when nsIChannel has no nsIPrompt
Darin has added notificationCallbacks to nsILoadGroup as part of bug 74221.
This is the right thing to add, rather than a naked nsIPrompt. So I believe the
API part of this bug has been satisfied, and the work remaining is no longer
absolutely required for 0.9. It'll probably get moved off to 0.9.1 as the date
approaches. I'm changing the summary to reflect what I believe is the actual work
remaining to be done.
The problem is that sometimes channels are initialized without notification
callbacks, or with callbacks that don't include an nsIPrompt. (That's a problem
if the channel consumer needs to pose an nsIPrompt.) Remaining to be done is
initialising loadgroups with a docshell notification callback, and teaching
channels to return a new aggregate nsIInterfaceRequestor that internally will try
first the channel's, and then the loadgroup's, when asked for an interface.
Dissent?
Comment 4•24 years ago
|
||
Dan, I can take a look at this for 0.9... I've dealt with
notificationCallbacks/nsIPrompt issues before. Unless you've got some headway
on this, kick it over to me.
Comment 5•24 years ago
|
||
danm: i don't think we need to make nsIChannel::GetNotificationCallbacks do
any aggregation. my suggestion was simply that a channel implementation could
ask its loadgroup's notificationCallbacks for a particular interface if its own
doesn't provide an implementation. wouldn't this be sufficient?
Darin: I don't think so, because of the way it's used. The channel doesn't know
that an nsIPrompt is what's wanted from it. It just gets a request for its
callbacks (an nsIInterfaceRequestor). The requestor then calls GetInterface on
the callbacks, after it's already been returned from the channel. It's only at
that point that we know which interface was wanted, so it's at that point that we
have to put the fallback code.
Comment 7•24 years ago
|
||
danm: i'm worried not about channel consumers getting at the callbacks, but
rather about the channel impl itself getting at the callbacks. consumers
should view the notificationCallbacks attribute as a "simple" attribute. i.e.,
what they set is what they get.
(Darin's and my disagreement is still being worked on.)
Moving to 0.9.1 and cutting the link to embedding/API tracking bugs 65233 and
70229 because the API part of this problem has been fixed as part of bug 74221.
What remains is purely implementation. (Besides, most of the visual effect of
this fix, once completed, has already been hacked around ^H^H^H fixed in bug
44809.)
reassigning to bryner because he still wants it.
Comment 9•24 years ago
|
||
Correction: Changing QA contact for the Embed API bugs to David Epstein.
QA Contact: mdunn → depstein
Updated•24 years ago
|
Status: NEW → ASSIGNED
Updated•24 years ago
|
Target Milestone: mozilla0.9.1 → ---
Comment 11•23 years ago
|
||
what's the status on this? is this still an issue?
Comment 12•23 years ago
|
||
this is still an issue. nsILoadGroup has a notificationCallbacks attribute,
but it is not currently implemented and the channel's do not currently use it.
but, i think rpotts may be working on a patch... though i'm not really sure.
Comment 13•23 years ago
|
||
Yes... I'm working on a patch which will cause each channel (without a
notification callbacks) to 'inherit' the notification callbacks of the load
group when it added...
-- rick
Comment 14•23 years ago
|
||
not critical for emojo or embedding (to my knowledge).
Target Milestone: --- → mozilla0.9.6
Comment 15•23 years ago
|
||
Marking as nsbranch- based on bryner comments.
Updated•23 years ago
|
Target Milestone: mozilla0.9.6 → mozilla1.0
Comment 17•23 years ago
|
||
rpotts or darin, do you want to take this bug? I've been out of the necko loop
for awhile.
Updated•23 years ago
|
Keywords: mozilla1.0
Comment 19•23 years ago
|
||
-> 0.9.9
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: mozilla1.0 → mozilla0.9.9
Comment 20•23 years ago
|
||
vinay: you recently fixed this bug for the http channel... you interested in
doing the same for the other channels?
Assignee | ||
Comment 21•23 years ago
|
||
assign it to me.
Assignee | ||
Comment 23•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Whiteboard: [patch needs r/sr=]
Comment 24•23 years ago
|
||
Comment on attachment 66281 [details] [diff] [review]
for FTP and gopher channels
>Index: gopher/src/nsGopherChannel.cpp
>+ nsCOMPtr<nsIPrompt> prompt(mPrompter);
>+ if (!prompt) {
i think you could do away with the |prompt| variable and just assign the
loadgroup's
nsIPrompt impl into mPrompter.
>Index: ftp/src/nsFtpConnectionThread.cpp
>
>+
> rv = mAuthPrompter->PromptUsernameAndPassword(nsnull,
intentional?
>@@ -1809,6 +1810,16 @@
>+ mPrompter = do_GetInterface(cbs, &rv);
>+ }
no need to capture |rv| if it's not going to be used.
otherwise, sr=darin (please submit a cleaned up patch)
Attachment #66281 -
Flags: needs-work+
Assignee | ||
Comment 25•23 years ago
|
||
Comment 26•23 years ago
|
||
Comment on attachment 66428 [details] [diff] [review]
incorporating darins comments
sr=darin
Attachment #66428 -
Flags: superreview+
Comment 27•23 years ago
|
||
Comment on attachment 66428 [details] [diff] [review]
incorporating darins comments
As darin mentioned, you don't need to capture &rv in the do_GetInterface for
gopher.
r=bbaetz with that fixed.
Attachment #66428 -
Flags: review+
Comment 28•23 years ago
|
||
Comment on attachment 66428 [details] [diff] [review]
incorporating darins comments
As darin mentioned, you don't need to capture &rv in the do_GetInterface for
gopher.
r=bbaetz with that fixed.
Assignee | ||
Comment 29•23 years ago
|
||
Fixed with checkins
Checking in ftp/src/nsFtpConnectionThread.cpp;
/cvsroot/mozilla/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp,v <--
nsFtpConnectionThread.cpp
new revision: 1.221; previous revision: 1.220
done
Checking in gopher/src/nsGopherChannel.cpp;
/cvsroot/mozilla/netwerk/protocol/gopher/src/nsGopherChannel.cpp,v <--
nsGopherChannel.cpp
new revision: 1.19; previous revision: 1.18
done
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•