From 34845f7872362af0694398d8cef7e201e97ff104 Mon Sep 17 00:00:00 2001 From: "dp%netscape.com" Date: Thu, 30 Aug 2001 22:59:12 +0000 Subject: [PATCH] bug #97658 Fixing build blocker. fixing js components after component registry has been created r=gagan git-svn-id: svn://10.0.0.236/trunk@102041 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/components/nsComponentManager.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/mozilla/xpcom/components/nsComponentManager.cpp b/mozilla/xpcom/components/nsComponentManager.cpp index c3c9a08b1c6..df555a0e3d8 100644 --- a/mozilla/xpcom/components/nsComponentManager.cpp +++ b/mozilla/xpcom/components/nsComponentManager.cpp @@ -17,9 +17,6 @@ * Copyright (C) 1998 Netscape Communications Corporation. All * Rights Reserved. * - * Contributor(s): - * Pierre Phaneuf - * * This Original Code has been modified by IBM Corporation. * Modifications made by IBM described herein are * Copyright (c) International Business Machines @@ -769,14 +766,14 @@ nsComponentManagerImpl::PlatformFind(const nsCID &aCID, nsFactoryEntry* *result) const char* componentType = componentTypeStr.get(); int type = -1; - if (NS_FAILED(rv)) + if (NS_FAILED(rv)) { if (rv == NS_ERROR_REG_NOT_FOUND) { /* missing componentType, we assume application/x-moz-native */ type = NS_COMPONENT_TYPE_NATIVE; } - else - return rv; // XXX translate error code? - + else + return rv; // XXX translate error code? + } if (type < 0) { // Find the right loader type index type = GetLoaderType(componentType); @@ -892,8 +889,12 @@ nsresult nsComponentManagerImpl::PlatformPrePopulateRegistry() getter_Copies(componentType)))) continue; + int loadertype = GetLoaderType(componentType); + if (loadertype < 0) { + loadertype = AddLoaderType(componentType); + } nsFactoryEntry* entry = - new nsFactoryEntry(aClass, library, GetLoaderType(componentType)); + new nsFactoryEntry(aClass, library, loadertype); if (!entry) continue;