Bug 1479945: Part 4 - Remove unused isContract directive flag. r?froydnj
MozReview-Commit-ID: DLCiNb39gA8
--- 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);