Closed
Bug 552470
Opened 15 years ago
Closed 15 years ago
Crash [@nsXULTreeItemAccessible::GetRoleInternal]
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
People
(Reporter: davidb, Assigned: davidb)
Details
Attachments
(1 file, 1 obsolete file)
1.13 KB,
patch
|
surkov
:
review+
|
Details | Diff | Splinter Review |
nsCoreUtils::GetFirstSensibleColumn can return null...
https://crash-stats.mozilla.com/report/index/9aebbb6a-1093-40a4-91fe-a5ace2100311
Assignee | ||
Updated•15 years ago
|
Attachment #432603 -
Attachment is patch: true
Attachment #432603 -
Attachment mime type: application/octet-stream → text/plain
Attachment #432603 -
Flags: review?(surkov.alexander)
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → bolterbugz
Comment 1•15 years ago
|
||
Is this because of a malformed XUL tree or what's going on?
Assignee | ||
Comment 2•15 years ago
|
||
Beats me.
Comment 3•15 years ago
|
||
Comment on attachment 432603 [details] [diff] [review]
null check.
> nsCOMPtr<nsITreeColumn> column =
> nsCoreUtils::GetFirstSensibleColumn(mTree);
>
> PRBool isPrimary = PR_FALSE;
>- column->GetPrimary(&isPrimary);
>+
>+ if (column) {
>+ column->GetPrimary(&isPrimary);
>+ }
>
I wonder why don't we use nsITreeColumns::getPrimaryColumn()?
Assignee | ||
Comment 4•15 years ago
|
||
(In reply to comment #3)
> (From update of attachment 432603 [details] [diff] [review])
>
> > nsCOMPtr<nsITreeColumn> column =
> > nsCoreUtils::GetFirstSensibleColumn(mTree);
> >
> > PRBool isPrimary = PR_FALSE;
> >- column->GetPrimary(&isPrimary);
> >+
> >+ if (column) {
> >+ column->GetPrimary(&isPrimary);
> >+ }
> >
>
> I wonder why don't we use nsITreeColumns::getPrimaryColumn()?
I think we should! Nice catch.
Assignee | ||
Updated•15 years ago
|
Attachment #432603 -
Flags: review?(surkov.alexander)
Assignee | ||
Comment 5•15 years ago
|
||
(In reply to comment #4)
> (In reply to comment #3)
> > (From update of attachment 432603 [details] [diff] [review] [details])
> >
> > > nsCOMPtr<nsITreeColumn> column =
> > > nsCoreUtils::GetFirstSensibleColumn(mTree);
> > >
> > > PRBool isPrimary = PR_FALSE;
> > >- column->GetPrimary(&isPrimary);
> > >+
> > >+ if (column) {
> > >+ column->GetPrimary(&isPrimary);
> > >+ }
> > >
> >
> > I wonder why don't we use nsITreeColumns::getPrimaryColumn()?
>
> I think we should! Nice catch.
It won't account for hidden columns though... is this a concern?
Assignee | ||
Comment 6•15 years ago
|
||
I guess I will just change nsXULTreeItemAccessible::GetRoleInternal and leave GetFirstSensibleColumn as is.
Assignee | ||
Comment 7•15 years ago
|
||
New patch will come after lunch :)
Comment 8•15 years ago
|
||
(In reply to comment #5)
>
> It won't account for hidden columns though... is this a concern?
Yes if it can be hidden. I know it can't be hidden from UI. But it's worth to check if it can be programmatically.
Assignee | ||
Comment 9•15 years ago
|
||
Attachment #432603 -
Attachment is obsolete: true
Attachment #433366 -
Flags: review?(surkov.alexander)
Comment 10•15 years ago
|
||
(In reply to comment #9)
> Created an attachment (id=433366) [details]
> use GetPrimaryFrame
column? It would be nice to know if primary column can be presented and hidden. I think nsITreeColumns object should care about this but it's worth to check. Could you do this please?
Assignee | ||
Comment 11•15 years ago
|
||
(In reply to comment #10)
> (In reply to comment #9)
> > Created an attachment (id=433366) [details] [details]
> > use GetPrimaryFrame
>
> column? It would be nice to know if primary column can be presented and hidden.
> I think nsITreeColumns object should care about this but it's worth to check.
nsITreeColumns doesn't care.
> Could you do this please?
Maybe but I'm not exactly sure what you are asking :)
Note nsXULTreeGridAccessible does the same thing I'm doing in this patch.
Assignee | ||
Comment 12•15 years ago
|
||
Ultimately the columns are looped through until IsPrimary succeeds:
PRBool IsPrimary() { return mIsPrimary; }
Assignee | ||
Comment 13•15 years ago
|
||
Aha we are okay, thanks surkov. nsITreeColumns cares about visibility in EnsureColumns.
Comment 14•15 years ago
|
||
Comment on attachment 433366 [details] [diff] [review]
use GetPrimaryFrame
r=me - nsITreeColumns cares the primary column is always visible so that's what we need.
Attachment #433366 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Comment 15•15 years ago
|
||
Landed on central: http://hg.mozilla.org/mozilla-central/rev/126bdd9262b5
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•