Bug 573382 - No chrome package registered for chrome://inspector/content/tasksOverlay.xul
authorJustin Wood (:Callek) <bugspam.Callek@gmail.com>
Sun, 04 Jul 2010 21:54:35 -0400
changeset 47271 735cd721df02b235328fd21ba5535cfa7b61a1b8
parent 47270 423b120d26e0c9bb9302e51525a153a6bdf07623
child 47272 67118cc6dcad767bb79ec30f8b9ec4a7cafb5536
push idunknown
push userunknown
push dateunknown
bugs573382
milestone2.0b2pre
Bug 573382 - No chrome package registered for chrome://inspector/content/tasksOverlay.xul r=dtownsend
xpcom/components/ManifestParser.cpp
--- a/xpcom/components/ManifestParser.cpp
+++ b/xpcom/components/ManifestParser.cpp
@@ -421,16 +421,19 @@ ParseManifestCommon(NSLocationType aType
   NS_NAMED_LITERAL_STRING(kPlatform, "platform");
   NS_NAMED_LITERAL_STRING(kContentAccessible, "contentaccessible");
   NS_NAMED_LITERAL_STRING(kApplication, "application");
   NS_NAMED_LITERAL_STRING(kAppVersion, "appversion");
   NS_NAMED_LITERAL_STRING(kOs, "os");
   NS_NAMED_LITERAL_STRING(kOsVersion, "osversion");
   NS_NAMED_LITERAL_STRING(kABI, "abi");
 
+  // Obsolete
+  NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers");
+
   nsAutoString appID;
   nsAutoString appVersion;
   nsAutoString osTarget;
   nsAutoString abi;
 
   nsCOMPtr<nsIXULAppInfo> xapp (do_GetService(XULAPPINFO_SERVICE_CONTRACTID));
   if (xapp) {
     nsCAutoString s;
@@ -559,26 +562,34 @@ ParseManifestCommon(NSLocationType aType
     bool platform = false;
     bool contentAccessible = false;
 
     while (NULL != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && ok) {
       ToLowerCase(token);
       NS_ConvertASCIItoUTF16 wtoken(token);
 
       if (CheckStringFlag(kApplication, wtoken, appID, stApp) ||
-	  CheckStringFlag(kOs, wtoken, osTarget, stOs) ||
+          CheckStringFlag(kOs, wtoken, osTarget, stOs) ||
           CheckStringFlag(kABI, wtoken, abi, stABI) ||
-	  CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) ||
-	  CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion))
-	continue;
+          CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) ||
+          CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion))
+        continue;
 
       if (directive->contentflags &&
-	  (CheckFlag(kPlatform, wtoken, platform) ||
-	   CheckFlag(kContentAccessible, wtoken, contentAccessible)))
-	  continue;
+          (CheckFlag(kPlatform, wtoken, platform) ||
+           CheckFlag(kContentAccessible, wtoken, contentAccessible)))
+        continue;
+
+      bool xpcNativeWrappers = true; // Dummy for CheckFlag.
+      if (CheckFlag(kXPCNativeWrappers, wtoken, xpcNativeWrappers)) {
+        LogMessageWithContext(aFile, aPath, line,
+                              "Warning: Ignoring obsolete chrome registration modifier '%s'.",
+                              token);
+        continue;
+      }
 
       LogMessageWithContext(aFile, aPath, line,
                             "Unrecognized chrome manifest modifier '%s'.",
                             token);
       ok = false;
     }
 
     if (!ok ||