зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1367715: Check for IClientSecurity in a11y QueryInterface implementations; r=surkov
MozReview-Commit-ID: FwGEq5GLom1 --HG-- extra : rebase_source : 73e2e1e494e75cb1126583ca947208025a533690
This commit is contained in:
Родитель
5e1f870e91
Коммит
e4ffc15186
|
@ -118,6 +118,14 @@ AccessibleWrap::QueryInterface(REFIID iid, void** ppv)
|
|||
|
||||
*ppv = nullptr;
|
||||
|
||||
if (IID_IClientSecurity == iid) {
|
||||
// Some code might QI(IID_IClientSecurity) to detect whether or not we are
|
||||
// a proxy. Right now that can potentially happen off the main thread, so we
|
||||
// look for this condition immediately so that we don't trigger other code
|
||||
// that might not be thread-safe.
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
if (IID_IUnknown == iid)
|
||||
*ppv = static_cast<IAccessible*>(this);
|
||||
else if (IID_IDispatch == iid || IID_IAccessible == iid)
|
||||
|
|
|
@ -39,6 +39,14 @@ sdnAccessible::QueryInterface(REFIID aREFIID, void** aInstancePtr)
|
|||
return E_FAIL;
|
||||
*aInstancePtr = nullptr;
|
||||
|
||||
if (aREFIID == IID_IClientSecurity) {
|
||||
// Some code might QI(IID_IClientSecurity) to detect whether or not we are
|
||||
// a proxy. Right now that can potentially happen off the main thread, so we
|
||||
// look for this condition immediately so that we don't trigger other code
|
||||
// that might not be thread-safe.
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
if (aREFIID == IID_ISimpleDOMNode) {
|
||||
*aInstancePtr = static_cast<ISimpleDOMNode*>(this);
|
||||
AddRef();
|
||||
|
|
Загрузка…
Ссылка в новой задаче