Bug 1479945: Part 3 - Remove the unused 'apponly' directive flag. r=froydnj
authorKris Maglione <maglione.k@gmail.com>
Tue, 31 Jul 2018 16:38:27 -0700
changeset 429728 20a1a11b4d0ba7010b36b952bb212f3c36e6aac3
parent 429727 ca43bd11f43161f03d3e0dd6bd9b28d446bbe7e1
child 429729 163276881d35942172fd18d8f2cd270fbab1de71
push id34372
push usernerli@mozilla.com
push dateThu, 02 Aug 2018 08:55:28 +0000
treeherdermozilla-central@bd79b07f57a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1479945
milestone63.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 1479945: Part 3 - Remove the unused 'apponly' directive flag. r=froydnj This is unused now that binary component support has been removed. MozReview-Commit-ID: KHTsF4sSoZX
xpcom/components/ManifestParser.cpp
--- a/xpcom/components/ManifestParser.cpp
+++ b/xpcom/components/ManifestParser.cpp
@@ -41,19 +41,16 @@
 
 using namespace mozilla;
 
 struct ManifestDirective
 {
   const char* directive;
   int argc;
 
-  // Binary components are only allowed for APP locations.
-  bool apponly;
-
   bool ischrome;
 
   bool allowbootstrap;
 
   // The contentaccessible flags only apply to content/resource directives.
   bool contentflags;
 
   // Function to handle this directive. This isn't a union because C++ still
@@ -64,51 +61,51 @@ struct ManifestDirective
   void (nsChromeRegistry::*regfunc)(
     nsChromeRegistry::ManifestProcessingContext& aCx,
     int aLineNo, char* const* aArgv, int aFlags);
 
   bool isContract;
 };
 static const ManifestDirective kParsingTable[] = {
   {
-    "manifest",         1, false, true, true, false,
+    "manifest",         1, true, true, false,
     &nsComponentManagerImpl::ManifestManifest, nullptr,
   },
   {
-    "component",        2, false, false, false, false,
+    "component",        2, false, false, false,
     &nsComponentManagerImpl::ManifestComponent, nullptr,
   },
   {
-    "contract",         2, false, false, false, false,
+    "contract",         2, false, false, false,
     &nsComponentManagerImpl::ManifestContract, nullptr,
   },
   {
-    "category",         3, false, false, false, false,
+    "category",         3, false, false, false,
     &nsComponentManagerImpl::ManifestCategory, nullptr,
   },
   {
-    "content",          2, false, true, true,  true,
+    "content",          2, true, true,  true,
     nullptr, &nsChromeRegistry::ManifestContent,
   },
   {
-    "locale",           3, false, true, true, false,
+    "locale",           3, true, true, false,
     nullptr, &nsChromeRegistry::ManifestLocale,
   },
   {
-    "skin",             3, false, true, true, false,
+    "skin",             3, true, true, false,
     nullptr, &nsChromeRegistry::ManifestSkin,
   },
   {
     // NB: note that while skin manifests can use this, they are only allowed
     // to use it for chrome://../skin/ URLs
-    "override",         2, false, true, true, false,
+    "override",         2, true, true, false,
     nullptr, &nsChromeRegistry::ManifestOverride,
   },
   {
-    "resource",         2, false, true, false, true,
+    "resource",         2, true, false, true,
     nullptr, &nsChromeRegistry::ManifestResource,
   }
 };
 
 static const char kWhitespace[] = "\t ";
 
 static bool
 IsNewline(char aChar)
@@ -580,24 +577,16 @@ ParseManifest(NSLocationType aType, File
 
     if (!directive->allowbootstrap && NS_BOOTSTRAPPED_LOCATION == aType) {
       LogMessageWithContext(aFile, line,
                             "Bootstrapped manifest not allowed to use '%s' directive.",
                             token);
       continue;
     }
 
-#ifndef MOZ_BINARY_EXTENSIONS
-    if (directive->apponly && NS_APP_LOCATION != aType) {
-      LogMessageWithContext(aFile, line,
-                            "Only application manifests may use the '%s' directive.", token);
-      continue;
-    }
-#endif
-
     NS_ASSERTION(directive->argc < 4, "Need to reset argv array length");
     char* argv[4];
     for (int i = 0; i < directive->argc; ++i) {
       argv[i] = nsCRT::strtok(whitespace, kWhitespace, &whitespace);
     }
 
     if (!argv[directive->argc - 1]) {
       LogMessageWithContext(aFile, line,