Bug 1034640 - crash in nsAccessibilityService::CreateAccessibleByFrameType, r=tbsaunde
authorAlexander Surkov <surkov.alexander@gmail.com>
Tue, 15 Jul 2014 10:17:16 -0400
changeset 216091 06a47123670eed7a7f7b74868db45a6f9e5fa838
parent 216090 8a29d7e989007132f4350455b1051c4fbf1fb737
child 216092 6876da7d8806680ec3336ccbeff2928bc46f18c7
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs1034640
milestone33.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 1034640 - crash in nsAccessibilityService::CreateAccessibleByFrameType, r=tbsaunde
accessible/base/nsAccessibilityService.cpp
--- a/accessible/base/nsAccessibilityService.cpp
+++ b/accessible/base/nsAccessibilityService.cpp
@@ -1555,19 +1555,19 @@ nsAccessibilityService::CreateAccessible
         newAcc = new HTMLTableCellAccessibleWrap(aContent, document);
       else
         newAcc = new HyperTextAccessibleWrap(aContent, document);
       break;
 
     case eHTMLTableRowType: {
       // Accessible HTML table row may be a child of tbody/tfoot/thead of
       // accessible HTML table or a direct child of accessible of HTML table.
-      Accessible* table = aContext->IsTable() ?
-        aContext :
-        (aContext->Parent()->IsTable() ? aContext->Parent() : nullptr);
+      Accessible* table = aContext->IsTable() ? aContext : nullptr;
+      if (!table && aContext->Parent() && aContext->Parent()->IsTable())
+        table = aContext->Parent();
 
       if (table) {
         nsIContent* parentContent = aContent->GetParent();
         nsIFrame* parentFrame = parentContent->GetPrimaryFrame();
         if (parentFrame->GetType() != nsGkAtoms::tableOuterFrame) {
           parentContent = parentContent->GetParent();
           parentFrame = parentContent->GetPrimaryFrame();
         }