mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 695843 part 2 - Avoid code duplication for components manifest registration. r=bsmedberg
This commit is contained in:
parent
bc8357295d
commit
e2ad2d961b
@ -399,18 +399,7 @@ nsresult nsComponentManagerImpl::Init()
|
||||
cl->jar = true;
|
||||
}
|
||||
|
||||
for (PRUint32 i = 0; i < sModuleLocations->Length(); ++i) {
|
||||
ComponentLocation& l = sModuleLocations->ElementAt(i);
|
||||
if (!l.jar) {
|
||||
RegisterManifestFile(l.type, l.location, false);
|
||||
continue;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIZipReader> reader = do_CreateInstance(kZipReaderCID, &rv);
|
||||
rv = reader->Open(l.location);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
RegisterJarManifest(l.type, reader, "chrome.manifest", false);
|
||||
}
|
||||
RereadChromeManifests(false);
|
||||
|
||||
nsCategoryManager::GetSingleton()->SuppressNotifications(false);
|
||||
|
||||
@ -902,12 +891,12 @@ nsComponentManagerImpl::ManifestCategory(ManifestProcessingContext& cx, int line
|
||||
}
|
||||
|
||||
void
|
||||
nsComponentManagerImpl::RereadChromeManifests()
|
||||
nsComponentManagerImpl::RereadChromeManifests(bool aChromeOnly)
|
||||
{
|
||||
for (PRUint32 i = 0; i < sModuleLocations->Length(); ++i) {
|
||||
ComponentLocation& l = sModuleLocations->ElementAt(i);
|
||||
if (!l.jar) {
|
||||
RegisterManifestFile(l.type, l.location, true);
|
||||
RegisterManifestFile(l.type, l.location, aChromeOnly);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -916,7 +905,7 @@ nsComponentManagerImpl::RereadChromeManifests()
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = reader->Open(l.location);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
RegisterJarManifest(l.type, reader, "chrome.manifest", true);
|
||||
RegisterJarManifest(l.type, reader, "chrome.manifest", aChromeOnly);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -299,7 +299,7 @@ public:
|
||||
void ManifestContract(ManifestProcessingContext& cx, int lineno, char* const * argv);
|
||||
void ManifestCategory(ManifestProcessingContext& cx, int lineno, char* const * argv);
|
||||
|
||||
void RereadChromeManifests();
|
||||
void RereadChromeManifests(bool aChromeOnly = true);
|
||||
|
||||
// Shutdown
|
||||
enum {
|
||||
|
Loading…
Reference in New Issue
Block a user