diff --git a/accessible/src/base/nsAccessNode.cpp b/accessible/src/base/nsAccessNode.cpp index d76c6a659f93..22fa9ef99e69 100644 --- a/accessible/src/base/nsAccessNode.cpp +++ b/accessible/src/base/nsAccessNode.cpp @@ -75,9 +75,7 @@ nsIStringBundle *nsAccessNode::gStringBundle = 0; nsIStringBundle *nsAccessNode::gKeyStringBundle = 0; nsIDOMNode *nsAccessNode::gLastFocusedNode = 0; -#ifdef DEBUG -PRBool nsAccessNode::gIsAccessibilityActive = PR_FALSE; -#endif + PRBool nsAccessNode::gIsCacheDisabled = PR_FALSE; PRBool nsAccessNode::gIsFormFillEnabled = PR_FALSE; nsAccessNodeHashtable nsAccessNode::gGlobalDocAccessibleCache; @@ -230,7 +228,8 @@ NS_IMETHODIMP nsAccessNode::GetOwnerWindow(void **aWindow) already_AddRefed nsAccessNode::GetApplicationAccessible() { - NS_ASSERTION(gIsAccessibilityActive, "Accessibility wasn't initialized!"); + NS_ASSERTION(!nsAccessibilityService::gIsShutdown, + "Accessibility wasn't initialized!"); if (!gApplicationAccessible) { nsApplicationAccessibleWrap::PreCreate(); @@ -256,9 +255,6 @@ nsAccessNode::GetApplicationAccessible() void nsAccessNode::InitXPAccessibility() { - NS_ASSERTION(!gIsAccessibilityActive, - "Accessibility was initialized already!"); - nsCOMPtr stringBundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID); if (stringBundleService) { @@ -279,9 +275,6 @@ void nsAccessNode::InitXPAccessibility() prefBranch->GetBoolPref("browser.formfill.enable", &gIsFormFillEnabled); } -#ifdef DEBUG - gIsAccessibilityActive = PR_TRUE; -#endif NotifyA11yInitOrShutdown(PR_TRUE); } @@ -304,8 +297,6 @@ void nsAccessNode::ShutdownXPAccessibility() // which happens when xpcom is shutting down // at exit of program - NS_ASSERTION(gIsAccessibilityActive, "Accessibility was shutdown already!"); - NS_IF_RELEASE(gStringBundle); NS_IF_RELEASE(gKeyStringBundle); NS_IF_RELEASE(gLastFocusedNode); @@ -318,9 +309,6 @@ void nsAccessNode::ShutdownXPAccessibility() NS_IF_RELEASE(gApplicationAccessible); gApplicationAccessible = nsnull; -#ifdef DEBUG - gIsAccessibilityActive = PR_FALSE; -#endif NotifyA11yInitOrShutdown(PR_FALSE); } diff --git a/accessible/src/base/nsAccessNode.h b/accessible/src/base/nsAccessNode.h index 1a82ca21064e..325ca5a9ea3f 100644 --- a/accessible/src/base/nsAccessNode.h +++ b/accessible/src/base/nsAccessNode.h @@ -202,9 +202,6 @@ protected: static nsIStringBundle *gStringBundle; static nsIStringBundle *gKeyStringBundle; -#ifdef DEBUG - static PRBool gIsAccessibilityActive; -#endif static PRBool gIsCacheDisabled; static PRBool gIsFormFillEnabled; diff --git a/accessible/src/msaa/nsAccessNodeWrap.cpp b/accessible/src/msaa/nsAccessNodeWrap.cpp index c58d57e74fcb..e49afadb3caf 100644 --- a/accessible/src/msaa/nsAccessNodeWrap.cpp +++ b/accessible/src/msaa/nsAccessNodeWrap.cpp @@ -593,9 +593,6 @@ __try { void nsAccessNodeWrap::InitAccessibility() { - NS_ASSERTION(!gIsAccessibilityActive, - "Accessibility was initialized already!"); - nsCOMPtr prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID)); if (prefBranch) { prefBranch->GetBoolPref("accessibility.disableenumvariant", &gIsEnumVariantSupportDisabled); @@ -622,8 +619,6 @@ void nsAccessNodeWrap::ShutdownAccessibility() NS_IF_RELEASE(gTextEvent); ::DestroyCaret(); - NS_ASSERTION(gIsAccessibilityActive, "Accessibility was shutdown already!"); - nsAccessNode::ShutdownXPAccessibility(); }