mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1278452 - Fix some null checks in dom/xbl/. r=mrbkap.
--HG-- extra : rebase_source : 2ffe1b24834ee863705b36085da44cefe331f951
This commit is contained in:
parent
ba949d4617
commit
3c7909e181
@ -541,9 +541,11 @@ nsXBLService::AttachGlobalKeyHandler(EventTarget* aTarget)
|
||||
piTarget = doc; // We're a XUL keyset. Attach to our document.
|
||||
}
|
||||
|
||||
EventListenerManager* manager = piTarget->GetOrCreateListenerManager();
|
||||
if (!piTarget)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (!piTarget || !manager)
|
||||
EventListenerManager* manager = piTarget->GetOrCreateListenerManager();
|
||||
if (!manager)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// the listener already exists, so skip this
|
||||
@ -586,9 +588,11 @@ nsXBLService::DetachGlobalKeyHandler(EventTarget* aTarget)
|
||||
if (doc)
|
||||
piTarget = do_QueryInterface(doc);
|
||||
|
||||
EventListenerManager* manager = piTarget->GetOrCreateListenerManager();
|
||||
if (!piTarget)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (!piTarget || !manager)
|
||||
EventListenerManager* manager = piTarget->GetOrCreateListenerManager();
|
||||
if (!manager)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsIDOMEventListener* handler =
|
||||
|
Loading…
Reference in New Issue
Block a user