Closed
Bug 133642
Opened 23 years ago
Closed 18 years ago
nsISelectionDisplay cannot be GetInterfaced from nsIWebBrowser.
Categories
(Core Graveyard :: Embedding: APIs, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.0.1
People
(Reporter: mjudge, Assigned: mjudge)
Details
Attachments
(1 file)
1.70 KB,
patch
|
bryner
:
review+
sfraser_bugs
:
superreview+
roc
:
approval+
|
Details | Diff | Splinter Review |
This bug was fixed and checked into 9.8. The last minute fix there did not get
into the trunk. I am currently trying to check this fix into 9.9 and I need to
check this into the trunk as well. This code is safe and tested in 9.8. Simply
a matter of the DocShell QI to look to its presshell and return the
nsISelectionDisplay that is supports through its nsISelectionController
interface.
safe fix. need to support getinterface of embedders to change the seleciton
flags. we do this through nsISelectionDisplay. 9.8 had this change to the
GetInterface. the trunk had all code in except these 2 snippets.
Comment 2•23 years ago
|
||
Comment on attachment 76338 [details] [diff] [review]
fix left out of trunk from 9.8 checkin.
r=bryner
Attachment #76338 -
Flags: review+
Comment 3•23 years ago
|
||
Comment on attachment 76338 [details] [diff] [review]
fix left out of trunk from 9.8 checkin.
sr=sfraser
Attachment #76338 -
Flags: superreview+
Comment on attachment 76338 [details] [diff] [review]
fix left out of trunk from 9.8 checkin.
a=roc+moz
Attachment #76338 -
Flags: approval+
Comment on attachment 76338 [details] [diff] [review]
fix left out of trunk from 9.8 checkin.
a=dbaron for trunk checkin. However:
>+ }
>+ else if (aIID.Equals(NS_GET_IID(nsISelectionDisplay))) {
>+ nsCOMPtr<nsIPresShell> shell;
>+ nsresult rv = GetPresShell(getter_AddRefs(shell));
>+ if (NS_SUCCEEDED(rv) && shell)
>+ return shell->QueryInterface(aIID,aSink);
I think you need a |return NS_NOINTERFACE;| here -- otherwise you
risk attempting to addref and returning NS_OK with an
**uninitialized** out param if GetPresShell fails or if the pres
shell is null.
>+ } else if (aIID.Equals(NS_GET_IID(nsISelectionDisplay))) {
>+ nsISelectionController* tmp = this;
>+ *aInstancePtr = (void*) tmp;
It seems a little more kosher to cast to |nsISelectionDisplay*|,
although this does work, since nsISelectionController derives
from nsISelectionDisplay. (If there's multiple inheritance from
nsISelectionDisplay going on here, it might be good to make that
more explicit with a three-step cast.)
Updated•23 years ago
|
QA Contact: mdunn → depstein
Comment 6•23 years ago
|
||
check on dbarons comments in 1.01
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0.1
Updated•22 years ago
|
QA Contact: depstein → ashishbhatt
Comment 7•18 years ago
|
||
Resolving fixed, since apparently nobody got around to it. (The code in question did in fact get checked in.)
Status: ASSIGNED → RESOLVED
Closed: 18 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
•