зеркало из https://github.com/mozilla/gecko-dev.git
Bug 181134 change PrintImageDecoders from nsIEnumerator to nsISimpleEnumerator
r=biesi sr=alecf
This commit is contained in:
Родитель
f214636536
Коммит
b5b5e98488
|
@ -48,8 +48,8 @@
|
||||||
// until this point, we have an evil hack:
|
// until this point, we have an evil hack:
|
||||||
#include "nsIHttpChannelInternal.h"
|
#include "nsIHttpChannelInternal.h"
|
||||||
|
|
||||||
#ifdef DEBUG_pavlov
|
#if defined(DEBUG_pavlov) || defined(DEBUG_timeless)
|
||||||
#include "nsIEnumerator.h"
|
#include "nsISimpleEnumerator.h"
|
||||||
#include "nsXPCOM.h"
|
#include "nsXPCOM.h"
|
||||||
#include "nsISupportsPrimitives.h"
|
#include "nsISupportsPrimitives.h"
|
||||||
#include "nsXPIDLString.h"
|
#include "nsXPIDLString.h"
|
||||||
|
@ -57,13 +57,18 @@
|
||||||
|
|
||||||
static void PrintImageDecoders()
|
static void PrintImageDecoders()
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIEnumerator> enumer;
|
nsCOMPtr<nsIComponentRegistrar> compMgr;
|
||||||
nsComponentManager::EnumerateContractIDs(getter_AddRefs(enumer));
|
if (NS_FAILED(NS_GetComponentRegistrar(getter_AddRefs(compMgr))) || !compMgr)
|
||||||
|
return;
|
||||||
|
nsCOMPtr<nsISimpleEnumerator> enumer;
|
||||||
|
if (NS_FAILED(compMgr->EnumerateContractIDs(getter_AddRefs(enumer))) || !enumer)
|
||||||
|
return;
|
||||||
|
|
||||||
nsCString str;
|
nsCString str;
|
||||||
nsCOMPtr<nsISupports> s;
|
nsCOMPtr<nsISupports> s;
|
||||||
do {
|
PRBool more = PR_FALSE;
|
||||||
enumer->CurrentItem(getter_AddRefs(s));
|
while (NS_SUCCEEDED(enumer->HasMoreElements(&more)) && more) {
|
||||||
|
enumer->GetNext(getter_AddRefs(s));
|
||||||
if (s) {
|
if (s) {
|
||||||
nsCOMPtr<nsISupportsCString> ss(do_QueryInterface(s));
|
nsCOMPtr<nsISupportsCString> ss(do_QueryInterface(s));
|
||||||
|
|
||||||
|
@ -76,7 +81,7 @@ static void PrintImageDecoders()
|
||||||
printf("Have decoder for mime type: %s\n", xcs.get()+decoderContract.Length());
|
printf("Have decoder for mime type: %s\n", xcs.get()+decoderContract.Length());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while(NS_SUCCEEDED(enumer->Next()));
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче