Bug 1691502: Don't attempt to invalidate table cache on outlines r=eeejay
authorMorgan Reschenberg <mreschenberg@mozilla.com>
Wed, 10 Feb 2021 18:29:36 +0000
changeset 566867 6ca1de7bf8a613f667098874cee78e516ad267ed
parent 566866 ce88b75e5b6c6cca0a4adc919f2fafdb40c89389
child 566868 b4948157d9613ee528a624af4bd0521674ea0dbd
push id38191
push userbtara@mozilla.com
push dateThu, 11 Feb 2021 05:02:45 +0000
treeherdermozilla-central@5cbcb80f72bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerseeejay
bugs1691502
milestone87.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1691502: Don't attempt to invalidate table cache on outlines r=eeejay Differential Revision: https://phabricator.services.mozilla.com/D104432
accessible/mac/mozTableAccessible.mm
--- a/accessible/mac/mozTableAccessible.mm
+++ b/accessible/mac/mozTableAccessible.mm
@@ -160,19 +160,24 @@ enum CachedBool { eCachedBoolMiss, eCach
     return [(mozOutlineAccessible*)parent isLayoutTablePart];
   }
 
   return NO;
 }
 
 - (void)invalidateLayoutTableCache {
   mozAccessible* parent = (mozAccessible*)[self moxUnignoredParent];
-  MOZ_ASSERT([parent isKindOfClass:[mozTablePartAccessible class]],
-             "Trying to invalidate table cache but cannot find table!");
-  [(mozTablePartAccessible*)parent invalidateLayoutTableCache];
+  if ([parent isKindOfClass:[mozTablePartAccessible class]]) {
+    // We do this to prevent dispatching invalidateLayoutTableCache
+    // on outlines or outline parts. This is possible here because
+    // outline rows subclass table rows, which are a table part.
+    // This means `parent` could be an outline, and there is no
+    // cache on outlines to invalidate.
+    [(mozTablePartAccessible*)parent invalidateLayoutTableCache];
+  }
 }
 @end
 
 @implementation mozTableAccessible
 
 - (void)invalidateLayoutTableCache {
   mIsLayoutTable = eCachedBoolMiss;
 }