Bug 702555 - Remove obsolete, broken debug method PrintImageDecoders() in imgLoader. r=jlebar
authorJames May <bzcc@fowlsmurf.net>
Thu, 23 Aug 2012 11:40:02 -0700
changeset 105232 16e1ff49a6a5e908f3923991c7b9e39f62cd8919
parent 105231 3de71b93776b59122bde4f6464e6a0bc3a6dc732
child 105233 a24e5db2886ddcb021dd8e5ae1ea2d8758aa26df
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersjlebar
bugs702555
milestone17.0a1
Bug 702555 - Remove obsolete, broken debug method PrintImageDecoders() in imgLoader. r=jlebar
image/src/imgLoader.cpp
--- a/image/src/imgLoader.cpp
+++ b/image/src/imgLoader.cpp
@@ -59,54 +59,16 @@
 #include "nsIContentSecurityPolicy.h"
 #include "nsIChannelPolicy.h"
 
 #include "nsContentUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::image;
 
-#if defined(DEBUG_pavlov) || defined(DEBUG_timeless)
-#include "nsISimpleEnumerator.h"
-#include "nsXPCOM.h"
-#include "nsISupportsPrimitives.h"
-#include "nsXPIDLString.h"
-#include "nsComponentManagerUtils.h"
-
-
-static void PrintImageDecoders()
-{
-  nsCOMPtr<nsIComponentRegistrar> compMgr;
-  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;
-  nsCOMPtr<nsISupports> s;
-  bool more = false;
-  while (NS_SUCCEEDED(enumer->HasMoreElements(&more)) && more) {
-    enumer->GetNext(getter_AddRefs(s));
-    if (s) {
-      nsCOMPtr<nsISupportsCString> ss(do_QueryInterface(s));
-
-      nsCAutoString xcs;
-      ss->GetData(xcs);
-
-      NS_NAMED_LITERAL_CSTRING(decoderContract, "@mozilla.org/image/decoder;3?type=");
-
-      if (StringBeginsWith(xcs, decoderContract)) {
-        printf("Have decoder for mime type: %s\n", xcs.get()+decoderContract.Length());
-      }
-    }
-  }
-}
-#endif
-
 NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(ImagesMallocSizeOf, "images")
 
 class imgMemoryReporter MOZ_FINAL :
   public nsIMemoryMultiReporter
 {
 public:
   imgMemoryReporter()
   {