Closed Bug 312367 Opened 20 years ago Closed 20 years ago

forward GI to the the wbp's listener

Categories

(Core Graveyard :: Embedding: APIs, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: chpe, Assigned: chpe)

Details

(Keywords: fixed1.8, Whiteboard: [sg:nse])

Attachments

(1 file, 1 obsolete file)

(Setting security sensitive as precaution not to reveal the patch from bug 304286.) My problem is similar to the one in bug 304286: I use nsWebBrowserPersist to download something in the background and don't want those certificate dialogues to pop up unexpectedly. The patch in bug 304286 allows notification callbacks to provide nsIBadCertListener. nsWebBrowserPersist::GI however only returns interfaces which nsWebBrowserPersist implements itself, and nsI[Auth]Prompt. After discussion with biesi on irc, I came up with the following patch: always forward the GI to the wbp's listener, while keeping the QI for the nsI[Auth]Prompt special case, to be backwards compatible.
Attached patch proposed fix (obsolete) — Splinter Review
Attachment #199465 - Flags: superreview?(darin)
Attachment #199465 - Flags: review?(cbiesinger)
Comment on attachment 199465 [details] [diff] [review] proposed fix r=biesi
Attachment #199465 - Flags: review?(cbiesinger) → review+
OS: Linux → All
Hardware: PC → All
Whiteboard: [sg:nse]
Comment on attachment 199465 [details] [diff] [review] proposed fix > if (mProgressListener && (aIID.Equals(NS_GET_IID(nsIAuthPrompt)) > || aIID.Equals(NS_GET_IID(nsIPrompt)))) > { > nsCOMPtr<nsISupports> sup = do_QueryInterface(mProgressListener); > if (sup) > { > sup->QueryInterface(aIID, aIFace); > if (*aIFace) > return NS_OK; > } >+ } How about this instead? (i.e., no need to QI to nsISupports!) mProgressListener->QueryInterface(aIID, aIFace); if (*aIFace) return NS_OK; sr=darin with that change :)
Attachment #199465 - Flags: superreview?(darin) → superreview+
biesi, are you handling checking this in, or should I?
I'd like to get this on the 1.8 branch. It's a simple change allowing embedders to implement more interfaces in their progress listeners and important to them for the same reasons as bug 304286; and the patch has no risk.
Assignee: adamlock → chpe
Attachment #199465 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #199527 - Flags: superreview+
Attachment #199527 - Flags: review+
Attachment #199527 - Flags: approval1.8rc1?
Has this landed on trunk? That needs to happen before requesting approval... See 1.8 tinderbox.
Comment on attachment 199527 [details] [diff] [review] updated patch with change requested by sr Not landed on trunk yet, no. Sorry, I didn't know about that rule. Clearing flag.
Attachment #199527 - Flags: approval1.8rc1?
checked in on trunk Checking in embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp; /cvsroot/mozilla/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp,v <-- nsWebBrowserPersist.cpp new revision: 1.110; previous revision: 1.109 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
(In reply to comment #5) > allowing embedders > to implement more interfaces in their progress listeners and important to them > for the same reasons as bug 304286; and the patch has no risk. I want to mention that it's not only embeddors for whom this patch is beneficial, extensions, too, can benefit from the patch.
Comment on attachment 199527 [details] [diff] [review] updated patch with change requested by sr Rerequesting a1.8rc1. Patch has no risk and is important for embedders and extension authors (see comment 5 and comment 9).
Attachment #199527 - Flags: approval1.8rc1?
Attachment #199527 - Flags: approval1.8rc1? → approval1.8rc1+
fixed on MOZILLA_1_8_BRANCH: Checking in embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp; /cvsroot/mozilla/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp,v <-- nsWebBrowserPersist.cpp new revision: 1.109.8.1; previous revision: 1.109 done
Keywords: fixed1.8
Can this bug be made public now, please?
Daniel, see comment 12? Should bug 304286 be public too?
Group: security
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: