Bug 1451673 - "Crash in mozilla::a11y::HTMLTableAccessible::IsProbablyLayoutTable" r=MarcoZ a=jcristau
authoralexander :surkov <surkov.alexander@gmail.com>
Thu, 05 Apr 2018 10:24:00 +0300
changeset 463197 c0ae9d98922d58dd629644966a67b35f30e35bda
parent 463196 d464bc1927f02af0fa7c4a3d5c1b38e1530f6fab
child 463198 b932d9bda916e058c01b7a6518a0d453edfbdc58
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMarcoZ, jcristau
bugs1451673
milestone60.0
Bug 1451673 - "Crash in mozilla::a11y::HTMLTableAccessible::IsProbablyLayoutTable" r=MarcoZ a=jcristau
accessible/html/HTMLTableAccessible.cpp
--- a/accessible/html/HTMLTableAccessible.cpp
+++ b/accessible/html/HTMLTableAccessible.cpp
@@ -1058,16 +1058,21 @@ HTMLTableAccessible::IsProbablyLayoutTab
   uint32_t childCount = ChildCount();
   nscolor rowColor = 0;
   nscolor prevRowColor;
   for (uint32_t childIdx = 0; childIdx < childCount; childIdx++) {
     Accessible* child = GetChildAt(childIdx);
     if (child->Role() == roles::ROW) {
       prevRowColor = rowColor;
       nsIFrame* rowFrame = child->GetFrame();
+      MOZ_ASSERT(rowFrame, "Table hierarchy got screwed up");
+      if (!rowFrame) {
+        RETURN_LAYOUT_ANSWER(false, "Unexpected table hierarchy");
+      }
+
       rowColor = rowFrame->StyleBackground()->BackgroundColor(rowFrame);
 
       if (childIdx > 0 && prevRowColor != rowColor)
         RETURN_LAYOUT_ANSWER(false, "2 styles of row background color, non-bordered");
     }
   }
 
   // Check for many rows