The default bug view has changed. See this FAQ.

make RootAccessible::NativeState faster

RESOLVED FIXED in mozilla15

Status

()

Core
Disability Access APIs
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: surkov, Assigned: surkov)

Tracking

(Blocks: 1 bug, {access})

unspecified
mozilla15
access
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 625571 [details] [diff] [review]
patch
Attachment #625571 - Flags: review?(trev.saunders)
(Assignee)

Updated

5 years ago
Attachment #625571 - Flags: review?(enndeakin)
(Assignee)

Updated

5 years ago
Blocks: 732872
Comment on attachment 625571 [details] [diff] [review]
patch

>+  PRUint64 state = nsDocAccessibleWrap::NativeState();
>+  if (state & states::DEFUNCT)
>+    return state;

what's it for?
Attachment #625571 - Flags: review?(trev.saunders) → review+
(Assignee)

Comment 2

5 years ago
(In reply to Trevor Saunders (:tbsaunde) from comment #1)
> Comment on attachment 625571 [details] [diff] [review]
> patch
> 
> >+  PRUint64 state = nsDocAccessibleWrap::NativeState();
> >+  if (state & states::DEFUNCT)
> >+    return state;
> 
> what's it for?

basically to not have a check for mDocument, in general I think we are allowed to not spend a time for states computation if accessible is defunct.
(In reply to alexander :surkov from comment #2)
> (In reply to Trevor Saunders (:tbsaunde) from comment #1)
> > Comment on attachment 625571 [details] [diff] [review]
> > patch
> > 
> > >+  PRUint64 state = nsDocAccessibleWrap::NativeState();
> > >+  if (state & states::DEFUNCT)
> > >+    return state;
> > 
> > what's it for?
> 
> basically to not have a check for mDocument, in general I think we are
> allowed to not spend a time for states computation if accessible is defunct.

yeah, was just wondering why it was possible we were dealing with a defunct accessible since I forgot about the atk crash.
(In reply to Trevor Saunders (:tbsaunde) from comment #3)
> (In reply to alexander :surkov from comment #2)
> > (In reply to Trevor Saunders (:tbsaunde) from comment #1)
> > > Comment on attachment 625571 [details] [diff] [review]
> > > patch
> > > 
> > > >+  PRUint64 state = nsDocAccessibleWrap::NativeState();
> > > >+  if (state & states::DEFUNCT)
> > > >+    return state;
> > > 
> > > what's it for?
> > 
> > basically to not have a check for mDocument, in general I think we are
> > allowed to not spend a time for states computation if accessible is defunct.
> 
> yeah, was just wondering why it was possible we were dealing with a defunct
> accessible since I forgot about the atk crash.

It might be cleaner to only return states::DEFUNCT here.
Which probably happens nearly all the time?
(In reply to David Bolter [:davidb] from comment #5)
> Which probably happens nearly all the time?

what? being called on a defunct accessible? hopefully not
(In reply to alexander :surkov from comment #2)
> (In reply to Trevor Saunders (:tbsaunde) from comment #1)
> > Comment on attachment 625571 [details] [diff] [review]
> > patch
> > 
> > >+  PRUint64 state = nsDocAccessibleWrap::NativeState();
> > >+  if (state & states::DEFUNCT)
> > >+    return state;
> > 
> > what's it for?
> 
> basically to not have a check for mDocument, in general I think we are
> allowed to not spend a time for states computation if accessible is defunct.

actually, I'm not sure how it works either, since we only set  the DEFUNCT state in nsAccessible::NativeState()
(In reply to Trevor Saunders (:tbsaunde) from comment #6)
> (In reply to David Bolter [:davidb] from comment #5)
> > Which probably happens nearly all the time?
> 
> what? being called on a defunct accessible?

No. I'm wondering how often is returning "state" equivalent to returning states::DEFUNCT (how often are other bits flipped).

Updated

5 years ago
Attachment #625571 - Flags: review?(enndeakin) → review+
(Assignee)

Updated

5 years ago
Assignee: nobody → surkov.alexander
(Assignee)

Comment 9

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/fb5b2c7e1b9b
Target Milestone: --- → mozilla15
https://hg.mozilla.org/mozilla-central/rev/fb5b2c7e1b9b
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.