mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 931399 - shutdown DocAccessible's when the related docshell is destroyed r=bz
When we get to PresShell::Destroy the pres shell and document have already nulled out their poitners to the docshell which DocAccessible::Shutdown() needs to remove the document from the command observer.
This commit is contained in:
parent
dc28fb0d43
commit
e58d9a62b9
@ -33,6 +33,7 @@
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsLayoutStylesheetCache.h"
|
||||
#include "mozilla/a11y/DocAccessible.h"
|
||||
#include "mozilla/BasicEvents.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/dom/EncodingUtils.h"
|
||||
@ -1549,6 +1550,16 @@ nsDocumentViewer::Destroy()
|
||||
// cache ourselves.
|
||||
shEntry->SyncPresentationState();
|
||||
|
||||
// Shut down accessibility for the document before we start to tear it down.
|
||||
#ifdef ACCESSIBILITY
|
||||
if (mPresShell) {
|
||||
a11y::DocAccessible* docAcc = mPresShell->GetDocAccessible();
|
||||
if (docAcc) {
|
||||
docAcc->Shutdown();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Break the link from the document/presentation to the docshell, so that
|
||||
// link traversals cannot affect the currently-loaded document.
|
||||
// When the presentation is restored, Open() and InitInternal() will reset
|
||||
|
Loading…
Reference in New Issue
Block a user