From 6622cf5d24758c748416d3d75ba9b252649d42b4 Mon Sep 17 00:00:00 2001 From: James Teh Date: Mon, 16 Oct 2017 11:22:47 +1000 Subject: [PATCH] Bug 1408638: Ensure accessible isn't defunct in Windows RootAccessibleWrap::accNavigate. r=MarcoZ Bug 1407475 added support for accNavigate(NAVRELATION_EMBEDS) for e10s. However, it's possible for a client to call this on the root accessible for a window which was since closed. Therefore, we must check whether the root accessible is defunct before trying to retrieve the tab document. MozReview-Commit-ID: 9iR6Kvzu5Mb --HG-- extra : rebase_source : 82afdecf915cd09cc3eaed948587b87d8ac4173b --- accessible/windows/msaa/RootAccessibleWrap.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/accessible/windows/msaa/RootAccessibleWrap.cpp b/accessible/windows/msaa/RootAccessibleWrap.cpp index 6e9c54089dfd..1f1027798ee8 100644 --- a/accessible/windows/msaa/RootAccessibleWrap.cpp +++ b/accessible/windows/msaa/RootAccessibleWrap.cpp @@ -124,6 +124,9 @@ RootAccessibleWrap::accNavigate( if (!pvarEndUpAt) { return E_INVALIDARG; } + if (IsDefunct()) { + return CO_E_OBJNOTCONNECTED; + } Accessible* target = nullptr; // Get the document in the active tab.