This repository was archived by the owner on Jul 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ namespace a11y {
27
27
28
28
inline mozAccessible* GetNativeFromGeckoAccessible (
29
29
mozilla::a11y::AccessibleOrProxy aAccOrProxy) {
30
- MOZ_ASSERT (!aAccOrProxy.IsNull (), " Cannot get native from null accessible" );
30
+ if (aAccOrProxy.IsNull ()) {
31
+ return nil ;
32
+ }
31
33
if (Accessible* acc = aAccOrProxy.AsAccessible ()) {
32
34
mozAccessible* native = nil ;
33
35
acc->GetNativeInterface ((void **)&native);
Original file line number Diff line number Diff line change @@ -263,10 +263,12 @@ - (BOOL)moxIgnoreWithParent:(mozAccessible*)parent {
263
263
// we override this method.
264
264
AccessibleOrProxy parentAcc = [parent geckoAccessible ];
265
265
if (!parentAcc.IsNull ()) {
266
- mozAccessible* directGrandparent =
267
- GetNativeFromGeckoAccessible (parentAcc.Parent ());
268
- if ([directGrandparent isKindOfClass: [MOXWebAreaAccessible class ]]) {
269
- return [parent moxIgnoreWithParent: directGrandparent];
266
+ AccessibleOrProxy grandparentAcc = parentAcc.Parent ();
267
+ if (mozAccessible* directGrandparent =
268
+ GetNativeFromGeckoAccessible (grandparentAcc)) {
269
+ if ([directGrandparent isKindOfClass: [MOXWebAreaAccessible class ]]) {
270
+ return [parent moxIgnoreWithParent: directGrandparent];
271
+ }
270
272
}
271
273
}
272
274
You can’t perform that action at this time.
0 commit comments