зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1124261, part 3 - Inline NS_NewXBLKeyEventHandler. r=smaug
This commit is contained in:
Родитель
69b2819df2
Коммит
69a49d21a2
|
@ -181,17 +181,3 @@ NS_NewXBLEventHandler(nsXBLPrototypeHandler* aHandler,
|
||||||
|
|
||||||
return handler.forget();
|
return handler.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
|
||||||
NS_NewXBLKeyEventHandler(nsIAtom* aEventType, uint8_t aPhase, uint8_t aType,
|
|
||||||
nsXBLKeyEventHandler** aResult)
|
|
||||||
{
|
|
||||||
*aResult = new nsXBLKeyEventHandler(aEventType, aPhase, aType);
|
|
||||||
|
|
||||||
if (!*aResult)
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
|
|
||||||
NS_ADDREF(*aResult);
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
|
@ -117,8 +117,4 @@ already_AddRefed<nsXBLEventHandler>
|
||||||
NS_NewXBLEventHandler(nsXBLPrototypeHandler* aHandler,
|
NS_NewXBLEventHandler(nsXBLPrototypeHandler* aHandler,
|
||||||
nsIAtom* aEventType);
|
nsIAtom* aEventType);
|
||||||
|
|
||||||
nsresult
|
|
||||||
NS_NewXBLKeyEventHandler(nsIAtom* aEventType, uint8_t aPhase,
|
|
||||||
uint8_t aType, nsXBLKeyEventHandler** aResult);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -807,11 +807,9 @@ nsXBLPrototypeBinding::CreateKeyHandlers()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == count) {
|
if (i == count) {
|
||||||
nsRefPtr<nsXBLKeyEventHandler> newHandler;
|
nsRefPtr<nsXBLKeyEventHandler> newHandler =
|
||||||
NS_NewXBLKeyEventHandler(eventAtom, phase, type,
|
new nsXBLKeyEventHandler(eventAtom, phase, type);
|
||||||
getter_AddRefs(newHandler));
|
mKeyHandlers.AppendObject(newHandler);
|
||||||
if (newHandler)
|
|
||||||
mKeyHandlers.AppendObject(newHandler);
|
|
||||||
handler = newHandler;
|
handler = newHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче