Bug 429654 - Crash Crash [@ nsDocAccessible::CreateTextChangeEventForNode(nsIAccessible*, nsIDOMNode*, nsIAccessible*, int, int) ] , r=aaronlev, a=beltzner

This commit is contained in:
surkov.alexander@gmail.com 2008-04-22 23:13:47 -07:00
parent ca67f9572c
commit 6a734e7d23

View File

@ -1562,9 +1562,12 @@ NS_IMETHODIMP nsDocAccessible::FlushPendingEvents()
// wait to fire this here, instead of in InvalidateCacheSubtree(), where we wouldn't be able to calculate // wait to fire this here, instead of in InvalidateCacheSubtree(), where we wouldn't be able to calculate
// the offset, length and text for the text change. // the offset, length and text for the text change.
if (domNode && domNode != mDOMNode) { if (domNode && domNode != mDOMNode) {
if (!containerAccessible) if (!containerAccessible) {
GetAccessibleInParentChain(domNode, PR_TRUE, GetAccessibleInParentChain(domNode, PR_TRUE,
getter_AddRefs(containerAccessible)); getter_AddRefs(containerAccessible));
if (!containerAccessible)
containerAccessible = this;
}
nsCOMPtr<nsIAccessibleTextChangeEvent> textChangeEvent = nsCOMPtr<nsIAccessibleTextChangeEvent> textChangeEvent =
CreateTextChangeEventForNode(containerAccessible, domNode, accessible, PR_TRUE, PR_TRUE); CreateTextChangeEventForNode(containerAccessible, domNode, accessible, PR_TRUE, PR_TRUE);