mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1692846 - Remove redundant nullptr checks of return value of infallible new in accessible/. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D105174
This commit is contained in:
parent
ae517d5b6d
commit
338908171d
@ -507,7 +507,7 @@ void RootAccessible::HandlePopupShownEvent(Accessible* aAccessible) {
|
||||
if (combobox->IsCombobox() || combobox->IsAutoComplete()) {
|
||||
RefPtr<AccEvent> event =
|
||||
new AccStateChangeEvent(combobox, states::EXPANDED, true);
|
||||
if (event) nsEventShell::FireEvent(event);
|
||||
nsEventShell::FireEvent(event);
|
||||
}
|
||||
|
||||
// If aria-activedescendant is present, redirect focus.
|
||||
|
@ -63,9 +63,6 @@ AccessibleHandler::Create(IUnknown* aOuter, REFIID aIid, void** aOutInterface) {
|
||||
|
||||
HRESULT hr;
|
||||
RefPtr<AccessibleHandler> handler(new AccessibleHandler(aOuter, &hr));
|
||||
if (!handler) {
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
@ -684,7 +684,6 @@ AccessibleEnumerator::Next(unsigned long celt, VARIANT FAR* rgvar,
|
||||
STDMETHODIMP
|
||||
AccessibleEnumerator::Clone(IEnumVARIANT FAR* FAR* ppenum) {
|
||||
*ppenum = new AccessibleEnumerator(*this);
|
||||
if (!*ppenum) return E_OUTOFMEMORY;
|
||||
NS_ADDREF(*ppenum);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -262,7 +262,6 @@ nsresult NS_GetAccessibilityService(nsIAccessibilityService** aResult) {
|
||||
}
|
||||
|
||||
xpcAccessibilityService* service = new xpcAccessibilityService();
|
||||
NS_ENSURE_TRUE(service, NS_ERROR_OUT_OF_MEMORY);
|
||||
xpcAccessibilityService::gXPCAccessibilityService = service;
|
||||
NS_ADDREF(*aResult = service);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user