зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1308397: Fix stack overflow by ensuring that ProxyAccessible::GetCOMInterface uses its real MSAA ID to lazily resolve its COM proxy, instead of using CHILDID_SELF; r=tbsaunde
MozReview-Commit-ID: 20xdOlcCXed
This commit is contained in:
Родитель
ea467855d3
Коммит
22d38ae56d
|
@ -36,7 +36,12 @@ ProxyAccessible::GetCOMInterface(void** aOutAccessible) const
|
||||||
AccessibleWrap* wrap = WrapperFor(this);
|
AccessibleWrap* wrap = WrapperFor(this);
|
||||||
bool isDefunct = false;
|
bool isDefunct = false;
|
||||||
ProxyAccessible* thisPtr = const_cast<ProxyAccessible*>(this);
|
ProxyAccessible* thisPtr = const_cast<ProxyAccessible*>(this);
|
||||||
thisPtr->mCOMProxy = wrap->GetIAccessibleFor(kChildIdSelf, &isDefunct);
|
// NB: Don't pass CHILDID_SELF here, use the absolute MSAA ID. Otherwise
|
||||||
|
// GetIAccessibleFor will recurse into this function and we will just
|
||||||
|
// overflow the stack.
|
||||||
|
VARIANT realId = {VT_I4};
|
||||||
|
realId.ulVal = wrap->GetExistingID();
|
||||||
|
thisPtr->mCOMProxy = wrap->GetIAccessibleFor(realId, &isDefunct);
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<IAccessible> addRefed = mCOMProxy;
|
RefPtr<IAccessible> addRefed = mCOMProxy;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче