Bug 691551 - Suppress warnings when a bootstrapped add-on has no chrome.manifest; r=dtownsend
authorGeoff Lankow <geoff@darktrojan.net>
Fri, 04 Nov 2011 10:59:24 +1300
changeset 80121 aef0684ac019aa2f6f78d2ad3d7fa0be89f90af8
parent 80120 95ae882ae390859975293998c05ba77ba4f4d6a2
child 80122 525329d5642a1c1a03aefdc413070685b6ae6fb4
push id21462
push usermak77@bonardo.net
push dateThu, 10 Nov 2011 10:40:54 +0000
treeherdermozilla-central@9ce43912891b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdtownsend
bugs691551
milestone11.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 691551 - Suppress warnings when a bootstrapped add-on has no chrome.manifest; r=dtownsend
xpcom/components/nsComponentManager.cpp
--- a/xpcom/components/nsComponentManager.cpp
+++ b/xpcom/components/nsComponentManager.cpp
@@ -545,17 +545,18 @@ LoadEntry(nsIZipReader* aReader, const c
 }
 
 void
 nsComponentManagerImpl::RegisterJarManifest(NSLocationType aType, nsIZipReader* aReader,
                                             const char* aPath, bool aChromeOnly)
 {
     nsCOMPtr<nsIInputStream> is = LoadEntry(aReader, aPath);
     if (!is) {
-        LogMessage("Could not find jar manifest entry '%s'.", aPath);
+        if (NS_BOOTSTRAPPED_LOCATION != aType)
+            LogMessage("Could not find jar manifest entry '%s'.", aPath);
         return;
     }
 
     PRUint32 flen;
     is->Available(&flen);
 
     nsAutoArrayPtr<char> whole(new char[flen + 1]);
     if (!whole)
@@ -614,17 +615,18 @@ nsComponentManagerImpl::RegisterManifest
 {
     nsresult rv;
 
     AutoCloseFD fd;
     rv = aFile->OpenNSPRFileDesc(PR_RDONLY, 0444, &fd);
     if (NS_FAILED(rv)) {
         nsCAutoString path;
         aFile->GetNativePath(path);
-        LogMessage("Could not read chrome manifest file '%s'.", path.get());
+        if (NS_BOOTSTRAPPED_LOCATION != aType)
+            LogMessage("Could not read chrome manifest file '%s'.", path.get());
         return;
     }
 
     PRFileInfo64 fileInfo;
     if (PR_SUCCESS != PR_GetOpenFileInfo64(fd, &fileInfo))
         return;
 
     if (fileInfo.size > PRInt64(PR_INT32_MAX))