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:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user