Bug 1479945: Part 4 - Remove unused isContract directive flag. r?froydnj draft
authorKris Maglione <maglione.k@gmail.com>
Tue, 31 Jul 2018 16:38:49 -0700
changeset 825127 1bb7d10416ee213903263201239b7ed78460225a
parent 825126 9d2eec67ad73be302b0520d98fc4ab0045fb7292
child 825128 ce865864f71e373d66e12ef8b1969b32f21c63e4
push id118032
push usermaglione.k@gmail.com
push dateTue, 31 Jul 2018 23:45:47 +0000
reviewersfroydnj
bugs1479945
milestone63.0a1
Bug 1479945: Part 4 - Remove unused isContract directive flag. r?froydnj MozReview-Commit-ID: DLCiNb39gA8
xpcom/components/ManifestParser.cpp
--- a/xpcom/components/ManifestParser.cpp
+++ b/xpcom/components/ManifestParser.cpp
@@ -56,18 +56,16 @@ struct ManifestDirective
   // Function to handle this directive. This isn't a union because C++ still
   // hasn't learned how to initialize unions in a sane way.
   void (nsComponentManagerImpl::*mgrfunc)(
     nsComponentManagerImpl::ManifestProcessingContext& aCx,
     int aLineNo, char* const* aArgv);
   void (nsChromeRegistry::*regfunc)(
     nsChromeRegistry::ManifestProcessingContext& aCx,
     int aLineNo, char* const* aArgv, int aFlags);
-
-  bool isContract;
 };
 static const ManifestDirective kParsingTable[] = {
   {
     "manifest",         1, true, true, false,
     &nsComponentManagerImpl::ManifestManifest, nullptr,
   },
   {
     "component",        2, false, false, false,
@@ -691,25 +689,18 @@ ParseManifest(NSLocationType aType, File
                                 "Chrome registry isn't available yet.");
           continue;
         }
       }
 
       (nsChromeRegistry::gChromeRegistry->*(directive->regfunc))(
         chromecx, line, argv, flags);
     } else if (directive->ischrome || !aChromeOnly) {
-      if (directive->isContract) {
-        CachedDirective* cd = contracts.AppendElement();
-        cd->lineno = line;
-        cd->argv[0] = argv[0];
-        cd->argv[1] = argv[1];
-      } else {
-        (nsComponentManagerImpl::gComponentManager->*(directive->mgrfunc))(
-          mgrcx, line, argv);
-      }
+      (nsComponentManagerImpl::gComponentManager->*(directive->mgrfunc))(
+        mgrcx, line, argv);
     }
   }
 
   for (uint32_t i = 0; i < contracts.Length(); ++i) {
     CachedDirective& d = contracts[i];
     nsComponentManagerImpl::gComponentManager->ManifestContract(mgrcx,
                                                                 d.lineno,
                                                                 d.argv);