bug 573382 - allow xpcnativewrappers to not fail-out in chrome manifest - commit on SeaMonkey 2.1a2 RELBRANCH ONLY to enable backwards compat for keeping DOM inspector working COMM193a5_20100623_RELBRANCH SEAMONKEY_2_1a2_BUILD1 SEAMONKEY_2_1a2_BUILD2 SEAMONKEY_2_1a2_RELEASE
authorJustin Wood <bugspam.Callek@gmail.com>
Mon, 21 Jun 2010 03:06:17 -0400
branchCOMM193a5_20100623_RELBRANCH
changeset 44184 f6cf82daa5bd
parent 44183 de4b3d642996
child 44185 a36985ce609f
push idunknown
push userunknown
push dateunknown
bugs573382
milestone1.9.3a6pre
bug 573382 - allow xpcnativewrappers to not fail-out in chrome manifest - commit on SeaMonkey 2.1a2 RELBRANCH ONLY to enable backwards compat for keeping DOM inspector working
chrome/src/nsChromeRegistry.cpp
--- a/chrome/src/nsChromeRegistry.cpp
+++ b/chrome/src/nsChromeRegistry.cpp
@@ -1664,16 +1664,19 @@ nsChromeRegistry::ProcessManifestBuffer(
 
   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");
 
+  // Obsolete
+  NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers");
+
   nsCOMPtr<nsIIOService> io (do_GetIOService());
   if (!io) return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsIProtocolHandler> ph;
   rv = io->GetProtocolHandler("resource", getter_AddRefs(ph));
   NS_ENSURE_SUCCESS(rv, rv);
   
   nsCOMPtr<nsIResProtocolHandler> rph (do_QueryInterface(ph));
@@ -1779,16 +1782,24 @@ nsChromeRegistry::ProcessManifestBuffer(
         if (CheckFlag(kPlatform, wtoken, platform) ||
             CheckFlag(kContentAccessible, wtoken, contentAccessible) ||
             CheckStringFlag(kApplication, wtoken, appID, stApp) ||
             CheckStringFlag(kOs, wtoken, osTarget, stOs) ||
             CheckVersionFlag(kOsVersion, wtoken, osVersion, vc, stOsVersion) ||
             CheckVersionFlag(kAppVersion, wtoken, appVersion, vc, stAppVersion))
           continue;
 
+        PRBool xpcNativeWrappers = PR_TRUE; // Dummy for CheckFlag.
+        if (CheckFlag(kXPCNativeWrappers, wtoken, xpcNativeWrappers)) {
+          LogMessageWithContext(aManifest, line, nsIScriptError::warningFlag,
+                                "Warning: Ignoring obsolete chrome registration modifier '%s'.",
+                                token);
+          continue;
+        }
+
         LogMessageWithContext(aManifest, line, nsIScriptError::warningFlag,
                               "Warning: Unrecognized chrome registration modifier '%s'.",
                               token);
         badFlag = PR_TRUE;
       }
 
       if (badFlag || stApp == eBad || stAppVersion == eBad || 
           stOs == eBad || stOsVersion == eBad)