Backout changeset b9e6454362ef (Bug 620931 part 3) for causing bug 644790.

This commit is contained in:
L. David Baron
2011-03-24 21:07:05 -07:00
parent aa8c20c872
commit 31bd671bd8
13 changed files with 309 additions and 585 deletions

View File

@@ -174,6 +174,8 @@ NS_DEFINE_CID(kCategoryManagerCID, NS_CATEGORYMANAGER_CID);
#define COMPMGR_TIME_FUNCTION_CONTRACTID(cid) do {} while (0)
#endif
#define kOMNIJAR_PREFIX NS_LITERAL_CSTRING("resource:///")
nsresult
nsGetServiceFromCategory::operator()(const nsIID& aIID, void** aInstancePtr) const
{
@@ -387,20 +389,14 @@ nsresult nsComponentManagerImpl::Init()
for (PRUint32 i = 0; i < sStaticModules->Length(); ++i)
RegisterModule((*sStaticModules)[i], NULL);
nsCOMPtr<nsIFile> appOmnijar = mozilla::Omnijar::GetPath(mozilla::Omnijar::APP);
if (appOmnijar) {
cl = sModuleLocations->InsertElementAt(1); // Insert after greDir
cl->type = NS_COMPONENT_LOCATION;
cl->location = do_QueryInterface(appOmnijar);
cl->jar = true;
}
nsCOMPtr<nsIFile> greOmnijar = mozilla::Omnijar::GetPath(mozilla::Omnijar::GRE);
if (greOmnijar) {
cl = sModuleLocations->InsertElementAt(0);
cl->type = NS_COMPONENT_LOCATION;
cl->location = do_QueryInterface(greOmnijar);
cl->jar = true;
#ifdef MOZ_OMNIJAR
if (mozilla::OmnijarPath()) {
nsCOMPtr<nsIZipReader> omnijarReader = new nsJAR();
rv = omnijarReader->Open(mozilla::OmnijarPath());
if (NS_SUCCEEDED(rv))
RegisterJarManifest(omnijarReader, "chrome.manifest", false);
}
#endif
for (PRUint32 i = 0; i < sModuleLocations->Length(); ++i) {
ComponentLocation& l = sModuleLocations->ElementAt(i);
@@ -415,6 +411,15 @@ nsresult nsComponentManagerImpl::Init()
RegisterJarManifest(reader, "chrome.manifest", false);
}
#ifdef MOZ_OMNIJAR
if (mozilla::OmnijarPath()) {
cl = sModuleLocations->InsertElementAt(0);
cl->type = NS_COMPONENT_LOCATION;
cl->location = mozilla::OmnijarPath();
cl->jar = true;
}
#endif
nsCategoryManager::GetSingleton()->SuppressNotifications(false);
mStatus = NORMAL;