Bug 506206 - ASSERTION: There should always be a DOM node for an event: 'Not Reached', file c:/mozilla/fx07-22/accessible/src/base/nsAccessibleEventData.cpp, line 114, r=ginn.chen

This commit is contained in:
Alexander Surkov 2009-08-04 13:21:59 +08:00
parent f41da52115
commit 7c5e637b62

View File

@ -38,6 +38,7 @@
#include "nsAccessibleEventData.h"
#include "nsAccessibilityAtoms.h"
#include "nsApplicationAccessibleWrap.h"
#include "nsCoreUtils.h"
#include "nsIAccessibilityService.h"
#include "nsIAccessNode.h"
@ -111,7 +112,15 @@ void nsAccEvent::CaptureIsFromUserInput(PRBool aIsAsynch)
nsCOMPtr<nsIDOMNode> eventNode;
GetDOMNode(getter_AddRefs(eventNode));
if (!eventNode) {
NS_NOTREACHED("There should always be a DOM node for an event");
// XXX: remove this hack during reorganization of 506907. Meanwhile we
// want to get rid an assertion for application accessible events which
// don't have DOM node (see bug 506206).
nsRefPtr<nsApplicationAccessibleWrap> applicationAcc =
nsAccessNode::GetApplicationAccessible();
nsCOMPtr<nsIAccessible> applicationAccessible = applicationAcc;
if (mAccessible != applicationAccessible)
NS_NOTREACHED("There should always be a DOM node for an event");
return;
}