Bug 154285 Mozilla crashes when i try to get HTML Radio button accessible node

r=aaronl, sr=jag
move nsLayoutAtoms::AddRefAtoms() from nsRootAccessible to nsAccessibilityService
This commit is contained in:
kyle.yuan%sun.com 2002-07-02 01:53:16 +00:00
Родитель 929cad358e
Коммит ccb8a3824b
2 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -104,10 +104,12 @@
nsAccessibilityService::nsAccessibilityService()
{
NS_INIT_REFCNT();
nsLayoutAtoms::AddRefAtoms();
}
nsAccessibilityService::~nsAccessibilityService()
{
nsLayoutAtoms::ReleaseAtoms();
}
NS_IMPL_THREADSAFE_ISUPPORTS1(nsAccessibilityService, nsIAccessibilityService);

Просмотреть файл

@ -63,7 +63,6 @@
#include "nsIDOMDocumentType.h"
#include "nsINameSpaceManager.h"
#include "nsIDOMNSHTMLSelectElement.h"
#include "nsLayoutAtoms.h"
#include "nsString.h"
#include "nsXPIDLString.h"
#include "nsIAccessibilityService.h"
@ -122,7 +121,6 @@ nsRootAccessible::nsRootAccessible(nsIWeakReference* aShell):nsAccessible(nsnull
shell->GetDocument(getter_AddRefs(mDocument));
mDOMNode = do_QueryInterface(mDocument);
}
nsLayoutAtoms::AddRefAtoms();
++gInstanceCount;
#ifdef DEBUG_LEAKS
printf("=====> %d nsRootAccessible's %x\n", gInstanceCount, (PRUint32)this);
@ -140,7 +138,6 @@ nsRootAccessible::~nsRootAccessible()
printf("======> %d nsRootAccessible's %x\n", gInstanceCount, (PRUint32)this);
#endif
nsLayoutAtoms::ReleaseAtoms();
RemoveAccessibleEventListener();
if (mScrollablePresShells)
delete mScrollablePresShells;