[tbb-commits] [tor-browser] 177/311: Bug 1749633 - Return early if event target is defunct. r=morgan a=dmeehan

gitolite role git at cupani.torproject.org
Tue Apr 26 15:29:37 UTC 2022


This is an automated email from the git hooks/post-receive script.

pierov pushed a commit to branch geckoview-99.0.1-11.0-1
in repository tor-browser.

commit a54fed24a5835180bffc1994a1072d97d8a80170
Author: Eitan Isaacson <eitan at monotonous.org>
AuthorDate: Fri Mar 11 23:16:58 2022 +0000

    Bug 1749633 - Return early if event target is defunct. r=morgan a=dmeehan
    
    Differential Revision: https://phabricator.services.mozilla.com/D140884
---
 accessible/mac/AccessibleWrap.mm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/accessible/mac/AccessibleWrap.mm b/accessible/mac/AccessibleWrap.mm
index 68243fb2d040b..475392c1ecfc5 100644
--- a/accessible/mac/AccessibleWrap.mm
+++ b/accessible/mac/AccessibleWrap.mm
@@ -145,6 +145,11 @@ nsresult AccessibleWrap::HandleAccEvent(AccEvent* aEvent) {
   nsresult rv = LocalAccessible::HandleAccEvent(aEvent);
   NS_ENSURE_SUCCESS(rv, rv);
 
+  if (IsDefunct()) {
+    // The accessible can become defunct after their events are handled.
+    return NS_OK;
+  }
+
   uint32_t eventType = aEvent->GetEventType();
 
   if (eventType == nsIAccessibleEvent::EVENT_SHOW) {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tbb-commits mailing list