mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 13:56:29 +00:00
Bug 369260. Thunderbird crash because accessibility cache is not invalidated for inner content window when containing chrome window closes. r=ginn.chen
This commit is contained in:
parent
ad35697de6
commit
bc2efea38c
@ -324,6 +324,7 @@ nsresult nsRootAccessible::AddEventListeners()
|
||||
GetChromeEventHandler(getter_AddRefs(target));
|
||||
if (target) {
|
||||
target->AddEventListener(NS_LITERAL_STRING("pagehide"), this, PR_TRUE);
|
||||
target->AddEventListener(NS_LITERAL_STRING("unload"), this, PR_TRUE);
|
||||
}
|
||||
|
||||
if (!mCaretAccessible) {
|
||||
@ -360,6 +361,7 @@ nsresult nsRootAccessible::RemoveEventListeners()
|
||||
GetChromeEventHandler(getter_AddRefs(target));
|
||||
if (target) {
|
||||
target->RemoveEventListener(NS_LITERAL_STRING("pagehide"), this, PR_TRUE);
|
||||
target->RemoveEventListener(NS_LITERAL_STRING("unload"), this, PR_TRUE);
|
||||
}
|
||||
|
||||
if (mCaretAccessible) {
|
||||
@ -591,7 +593,8 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
|
||||
nsIAccessibilityService *accService = GetAccService();
|
||||
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
|
||||
|
||||
if (eventType.LowerCaseEqualsLiteral("pagehide")) {
|
||||
if (eventType.LowerCaseEqualsLiteral("pagehide") ||
|
||||
eventType.LowerCaseEqualsLiteral("unload")) {
|
||||
// pagehide event can be fired under several conditions, such as HTML
|
||||
// document going away, closing a window/dialog, and wizard page changing.
|
||||
// We only destroy the accessible object when it's a document accessible,
|
||||
|
Loading…
x
Reference in New Issue
Block a user