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
--- a/accessible/windows/msaa/RootAccessibleWrap.cpp
+++ b/accessible/windows/msaa/RootAccessibleWrap.cpp
@@ -119,16 +119,19 @@ RootAccessibleWrap::accNavigate(
// We only handle EMBEDS on the root here.
// Forward to the base implementation.
return DocAccessibleWrap::accNavigate(navDir, varStart, pvarEndUpAt);
}
if (!pvarEndUpAt) {
return E_INVALIDARG;
}
+ if (IsDefunct()) {
+ return CO_E_OBJNOTCONNECTED;
+ }
Accessible* target = nullptr;
// Get the document in the active tab.
ProxyAccessible* docProxy = GetPrimaryRemoteTopLevelContentDoc();
if (docProxy) {
target = WrapperFor(docProxy);
} else {
// The base implementation could handle this, but we may as well