Bug 1479945: Part 2 - Remove support for componentonly directive flag. r=froydnj
authorKris Maglione <maglione.k@gmail.com>
Tue, 31 Jul 2018 16:33:08 -0700
changeset 429727 ca43bd11f43161f03d3e0dd6bd9b28d446bbe7e1
parent 429726 71700b368132dd0735d4b792d6dbc6e1365790d4
child 429728 20a1a11b4d0ba7010b36b952bb212f3c36e6aac3
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 2 - Remove support for componentonly directive flag. r=froydnj This serves no purpose now that legacy theme support has been removed. MozReview-Commit-ID: BpLcQYfZtAZ
xpcom/components/ManifestParser.cpp
--- a/xpcom/components/ManifestParser.cpp
+++ b/xpcom/components/ManifestParser.cpp
@@ -44,19 +44,16 @@ using namespace mozilla;
 struct ManifestDirective
 {
   const char* directive;
   int argc;
 
   // Binary components are only allowed for APP locations.
   bool apponly;
 
-  // Some directives should only be delivered for APP or EXTENSION locations.
-  bool componentonly;
-
   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
@@ -67,51 +64,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, false, true, true, false,
+    "manifest",         1, false, true, true, false,
     &nsComponentManagerImpl::ManifestManifest, nullptr,
   },
   {
-    "component",        2, false, true, false, false, false,
+    "component",        2, false, false, false, false,
     &nsComponentManagerImpl::ManifestComponent, nullptr,
   },
   {
-    "contract",         2, false, true, false, false, false,
+    "contract",         2, false, false, false, false,
     &nsComponentManagerImpl::ManifestContract, nullptr,
   },
   {
-    "category",         3, false, true, false, false, false,
+    "category",         3, false, false, false, false,
     &nsComponentManagerImpl::ManifestCategory, nullptr,
   },
   {
-    "content",          2, false, true, true, true,  true,
+    "content",          2, false, true, true,  true,
     nullptr, &nsChromeRegistry::ManifestContent,
   },
   {
-    "locale",           3, false, true, true, true, false,
+    "locale",           3, false, true, true, false,
     nullptr, &nsChromeRegistry::ManifestLocale,
   },
   {
-    "skin",             3, false, false, true, true, false,
+    "skin",             3, false, 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, false, true, true, false,
+    "override",         2, false, true, true, false,
     nullptr, &nsChromeRegistry::ManifestOverride,
   },
   {
-    "resource",         2, false, true, true, false, true,
+    "resource",         2, false, true, false, true,
     nullptr, &nsChromeRegistry::ManifestResource,
   }
 };
 
 static const char kWhitespace[] = "\t ";
 
 static bool
 IsNewline(char aChar)
@@ -591,23 +588,16 @@ ParseManifest(NSLocationType aType, File
 #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
 
-    if (directive->componentonly && NS_SKIN_LOCATION == aType) {
-      LogMessageWithContext(aFile, line,
-                            "Skin manifest not allowed to use '%s' directive.",
-                            token);
-      continue;
-    }
-
     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,