1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 13:58:49 +00:00

Bug 2025370 - Properly handle error case in EventListenerManager::GetTypedEventHandler

This commit is contained in:
Olli Pettay
2026-04-25 11:03:41 +02:00
committed by roytam1
parent 853057cf33
commit 096dffbcab
+5 -1
View File
@@ -1632,8 +1632,12 @@ EventListenerManager::GetTypedEventHandler(nsIAtom* aEventName,
JSEventHandler* jsEventHandler = listener->GetJSEventHandler();
Maybe<RefPtr<JSEventHandler>> pin;
if (listener->mHandlerIsString) {
CompileEventHandlerInternal(listener, nullptr, nullptr);
pin.emplace(jsEventHandler);
if (NS_FAILED(CompileEventHandlerInternal(listener, nullptr, nullptr))) {
listener = nullptr;
}
}
const TypedEventHandler& typedHandler =