Bug 1194859 - Crash in mozilla::a11y::ARIAGridCellAccessible::GroupPosition(), part2. r=marcoz, a=sledru
authorAlexander Surkov <surkov.alexander@gmail.com>
Fri, 28 Aug 2015 10:52:21 -0400
changeset 289051 b1098c02a9cadcfc55ad0db900c26db3e7320214
parent 289050 c03eb276968912168fe1ad0e818a5aea5fe8570e
child 289052 ef5f85d45d354130f52fa3c41d8a7e046f459b07
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarcoz, sledru
bugs1194859
milestone42.0a2
Bug 1194859 - Crash in mozilla::a11y::ARIAGridCellAccessible::GroupPosition(), part2. r=marcoz, a=sledru
accessible/generic/ARIAGridAccessible.cpp
accessible/html/HTMLTableAccessible.cpp
--- a/accessible/generic/ARIAGridAccessible.cpp
+++ b/accessible/generic/ARIAGridAccessible.cpp
@@ -685,17 +685,17 @@ ARIAGridCellAccessible::NativeAttributes
 
   return attributes.forget();
 }
 
 GroupPos
 ARIAGridCellAccessible::GroupPosition()
 {
   int32_t count = 0, index = 0;
-  Accessible* table = Table()->AsAccessible();
-  if (table && nsCoreUtils::GetUIntAttr(table->GetContent(),
+  TableAccessible* table = Table();
+  if (table && nsCoreUtils::GetUIntAttr(table->AsAccessible()->GetContent(),
                                         nsGkAtoms::aria_colcount, &count) &&
       nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_colindex, &index)) {
     return GroupPos(0, index, count);
   }
 
   return GroupPos();
 }
--- a/accessible/html/HTMLTableAccessible.cpp
+++ b/accessible/html/HTMLTableAccessible.cpp
@@ -142,18 +142,18 @@ HTMLTableCellAccessible::NativeAttribute
 
   return attributes.forget();
 }
 
 GroupPos
 HTMLTableCellAccessible::GroupPosition()
 {
   int32_t count = 0, index = 0;
-  Accessible* table = Table()->AsAccessible();
-  if (table && nsCoreUtils::GetUIntAttr(table->GetContent(),
+  TableAccessible* table = Table();
+  if (table && nsCoreUtils::GetUIntAttr(table->AsAccessible()->GetContent(),
                                         nsGkAtoms::aria_colcount, &count) &&
       nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_colindex, &index)) {
     return GroupPos(0, index, count);
   }
 
   return HyperTextAccessibleWrap::GroupPosition();
 }