Bug 508989 random crash with GTK print dialog with a11y r=surkov.alexander

This commit is contained in:
Ginn Chen 2009-08-11 14:59:05 +08:00
parent 40156e2b51
commit d2062497a7

View File

@ -88,6 +88,9 @@ nsDocAccessible::nsDocAccessible(nsIDOMNode *aDOMNode, nsIWeakReference* aShell)
mScrollPositionChangedTicks(0), mIsContentLoaded(PR_FALSE),
mIsLoadCompleteFired(PR_FALSE), mInFlushPendingEvents(PR_FALSE)
{
// XXX aaronl should we use an algorithm for the initial cache size?
mAccessNodeCache.Init(kDefaultCacheSize);
// For GTK+ native window, we do nothing here.
if (!mDOMNode)
return;
@ -113,9 +116,6 @@ nsDocAccessible::nsDocAccessible(nsIDOMNode *aDOMNode, nsIWeakReference* aShell)
}
}
// XXX aaronl should we use an algorithm for the initial cache size?
mAccessNodeCache.Init(kDefaultCacheSize);
nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem =
nsCoreUtils::GetDocShellTreeItemFor(mDOMNode);
nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(docShellTreeItem);