author | Boris Zbarsky <bzbarsky@mit.edu> |
Fri, 11 Jun 2010 15:23:13 -0400 | |
changeset 43529 | e16ee5d09003c75a03a9f016705f65301ba19d63 |
parent 43528 | 574993ec2aeea70d719a79c53f6b2b695021028f |
child 43530 | 36dec4f55fa8d2b33a91ac77f9e082745f0285d5 |
push id | 13750 |
push user | bzbarsky@mozilla.com |
push date | Fri, 11 Jun 2010 19:24:45 +0000 |
treeherder | mozilla-central@e16ee5d09003 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | surkov |
bugs | 571541 |
milestone | 1.9.3a6pre |
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
|
--- a/accessible/src/base/nsAccDocManager.cpp +++ b/accessible/src/base/nsAccDocManager.cpp @@ -1,8 +1,9 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * @@ -516,35 +517,35 @@ nsAccDocManager::CreateDocOrRootAccessib return docAcc; } void nsAccDocManager::ShutdownDocAccessiblesInTree(nsIDocShellTreeItem *aTreeItem, nsIDocument *aDocument) { nsCOMPtr<nsIDocShellTreeNode> treeNode(do_QueryInterface(aTreeItem)); - if (!treeNode) - return; - PRInt32 subDocumentsCount = 0; - treeNode->GetChildCount(&subDocumentsCount); - for (PRInt32 idx = 0; idx < subDocumentsCount; idx++) { - nsCOMPtr<nsIDocShellTreeItem> treeItemChild; - treeNode->GetChildAt(idx, getter_AddRefs(treeItemChild)); - NS_ASSERTION(treeItemChild, "No tree item when there should be"); - if (!treeItemChild) - continue; + if (treeNode) { + PRInt32 subDocumentsCount = 0; + treeNode->GetChildCount(&subDocumentsCount); + for (PRInt32 idx = 0; idx < subDocumentsCount; idx++) { + nsCOMPtr<nsIDocShellTreeItem> treeItemChild; + treeNode->GetChildAt(idx, getter_AddRefs(treeItemChild)); + NS_ASSERTION(treeItemChild, "No tree item when there should be"); + if (!treeItemChild) + continue; - nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(treeItemChild)); - nsCOMPtr<nsIContentViewer> contentViewer; - docShell->GetContentViewer(getter_AddRefs(contentViewer)); - if (!contentViewer) - continue; + nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(treeItemChild)); + nsCOMPtr<nsIContentViewer> contentViewer; + docShell->GetContentViewer(getter_AddRefs(contentViewer)); + if (!contentViewer) + continue; - ShutdownDocAccessiblesInTree(treeItemChild, contentViewer->GetDocument()); + ShutdownDocAccessiblesInTree(treeItemChild, contentViewer->GetDocument()); + } } ShutdownDocAccessible(aDocument); } void nsAccDocManager::ShutdownDocAccessible(nsIDocument *aDocument) {