Closed
Bug 68187
Opened 25 years ago
Closed 25 years ago
nsIWebBrowser::AddBrowserListener() needs to take an nsIWeakReference
Categories
(Core Graveyard :: Embedding: APIs, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9
People
(Reporter: jud, Assigned: jud)
Details
Attachments
(6 files)
|
6.66 KB,
patch
|
Details | Diff | Splinter Review | |
|
9.52 KB,
patch
|
Details | Diff | Splinter Review | |
|
979 bytes,
patch
|
Details | Diff | Splinter Review | |
|
9.59 KB,
patch
|
Details | Diff | Splinter Review | |
|
1001 bytes,
patch
|
Details | Diff | Splinter Review | |
|
981 bytes,
patch
|
Details | Diff | Splinter Review |
right now we have the impl requirement that the listener impl nsIWeakReference.
this should be reflected by replacing nsISupports w/ nsIWeakReference in the
method signature.
| Assignee | ||
Updated•25 years ago
|
Severity: normal → major
Priority: -- → P1
Target Milestone: --- → mozilla0.9
| Assignee | ||
Comment 1•25 years ago
|
||
Comment 2•25 years ago
|
||
This all looks good, except that you should prefer direct-initialization over
copy-initialization, that is, prefer constructions
nsCOMPtr<nsIWeakReference> listener(do_QueryInterface(...));
// ...
nsCOMPtr<nsIWeakReference> thisListener(do_QueryInterface(listener));
over the form with '='. After you fix that, sr=scc.
| Assignee | ||
Comment 3•25 years ago
|
||
| Assignee | ||
Comment 4•25 years ago
|
||
| Assignee | ||
Comment 5•25 years ago
|
||
I've updated the patches as the direct QI to a nsIWeakReference was failing. I
needed to be using NS_GetWeakReference (which I now am). I've also added a patch
to viewer so it can use the new mechanism as well.
Comment 6•25 years ago
|
||
More evidence, I guess, that I really need to provide a |do_GetWeakReference|.
This still isn't right. To get a weak reference you need to say
nsCOMPtr<nsIWeakReference> weakling( dont_AddRef(NS_GetWeakReference(...)) );
| Assignee | ||
Comment 7•25 years ago
|
||
| Assignee | ||
Comment 8•25 years ago
|
||
Comment 9•25 years ago
|
||
Now I buy it. One of us should file a bug, though, that |do_GetWeakReference|
is wanted. sr=scc
Comment 10•25 years ago
|
||
Comment 11•25 years ago
|
||
The patch to CBrowserShell.cpp in patch id=25206 didn't quite compile - now it does.
| Assignee | ||
Comment 12•25 years ago
|
||
thanks for the mac check conrad. these changes (including conrad's mods) are in.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 13•25 years ago
|
||
Correction: Changing QA contact for the Embed API bugs to David Epstein.
QA Contact: mdunn → depstein
Comment 14•25 years ago
|
||
in nsIWebBrowser.idl, we see that the listener accepts a weak reference:
void addWebBrowserListener(in nsIWeakReference aListener, in nsIIDRef aIID);
Status: RESOLVED → VERIFIED
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•