Closed Bug 1430412 Opened 7 years ago Closed 7 years ago

Only fire 'a11y-init-or-shutdown' when a11y service is actually fully created or destroyed.

Categories

(Core :: Disability Access APIs, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: yzen, Assigned: yzen)

References

Details

(Keywords: access)

Attachments

(1 file)

At the moment we fire the event before all the components are created, destroyed. We need to change that to only fire when everything is completed. 

The reason being is that sometimes (most of the time) when we get an event and check Services.appinfo.accessibilityEnabled it is not in sync (e.g. we might not or still have a reference to an a11y service that is being created or destroyed).
Attached patch 1430412 patch (deleted) — Splinter Review
Attachment #8942449 - Flags: review?(surkov.alexander)
Comment on attachment 8942449 [details] [diff] [review]
1430412 patch

Review of attachment 8942449 [details] [diff] [review]:
-----------------------------------------------------------------

::: accessible/base/nsAccessibilityService.cpp
@@ +1457,5 @@
> +
> +  if (observerService) {
> +    static const char16_t kShutdownIndicator[] = { '0', 0 };
> +    observerService->NotifyObservers(nullptr, "a11y-init-or-shutdown", kShutdownIndicator);
> +  }

usually shutdown is fired before the actual shutdown happens, so the listener has a grace period to shutdown the things properly on his end. are you sure about the change?
I think I am, yes. Having Services.appinfo.accessibilityEnabled not in sync really hurts. There is then no reliable way to know when accessibility is truly shut down.
Comment on attachment 8942449 [details] [diff] [review]
1430412 patch

Review of attachment 8942449 [details] [diff] [review]:
-----------------------------------------------------------------

r=me then, afaik devtools is only one real consumer of it, and it's safe to change the behavior to whatever you want.
Attachment #8942449 - Flags: review?(surkov.alexander) → review+
Pushed by yura.zenevich@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5be045f0db76
fire 'a11y-init-or-shutdown' at the end of a11y service init and shutdown calls. r=surkov
https://hg.mozilla.org/mozilla-central/rev/5be045f0db76
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: