*aResult = nsnull;  if (aCallbacks) aCallbacks->GetInterface(aIID, aResult); if (!*aResult) {  if (aLoadGroup) { nsCOMPtr<nsIInterfaceRequestor> cbs; aLoadGroup->GetNotificationCallbacks(getter_AddRefs(cbs)); if (cbs) cbs->GetInterface(aIID, aResult); } }
NS_QueryNotificationCallbacks(aCallbacks, aLoadGroup, NS_GET_IID(T), getter_AddRefs(aResult));
NS_QueryNotificationCallbacks(nsIInterfaceRequestor  *aCallbacks,                              nsILoadGroup           *aLoadGroup,                              const nsIID            &aIID,                              void                  **aResult){    *aResult = nsnull;    if (aCallbacks)        aCallbacks->GetInterface(aIID, aResult);    if (!*aResult) {        // try load group's notification callbacks...        if (aLoadGroup) {            nsCOMPtr<nsIInterfaceRequestor> cbs;            aLoadGroup->GetNotificationCallbacks(getter_AddRefs(cbs));            if (cbs)                cbs->GetInterface(aIID, aResult);        }    }}