Fix a logic error caught by the MSVC compiler and an initializer error, bug 316416

This commit is contained in:
bsmedberg%covad.net 2005-12-02 17:38:18 +00:00
Родитель 42c519791c
Коммит 0064770824
3 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -329,7 +329,7 @@ PR_STATIC_CALLBACK(void)
contractID_ClearEntry(PLDHashTable *aTable, PLDHashEntryHdr *aHdr) contractID_ClearEntry(PLDHashTable *aTable, PLDHashEntryHdr *aHdr)
{ {
nsContractIDTableEntry* entry = NS_STATIC_CAST(nsContractIDTableEntry*, aHdr); nsContractIDTableEntry* entry = NS_STATIC_CAST(nsContractIDTableEntry*, aHdr);
if (!entry->mFactoryEntry->mLoaderType == NS_LOADER_TYPE_INVALID && if (entry->mFactoryEntry->mLoaderType == NS_LOADER_TYPE_INVALID &&
entry->mFactoryEntry->mCid.Equals(kEmptyCID)) { entry->mFactoryEntry->mCid.Equals(kEmptyCID)) {
// this object is owned by the hash. // this object is owned by the hash.
// nsFactoryEntry is arena allocated. So we don't delete it. // nsFactoryEntry is arena allocated. So we don't delete it.

Просмотреть файл

@ -117,7 +117,7 @@ nsNativeModuleLoader::LoadModule(nsILocalFile* aFile, nsIModule* *aResult)
return NS_NOINTERFACE; return NS_NOINTERFACE;
} }
NativeLoadData data = { nsnull, nsnull }; NativeLoadData data;
if (mLibraries.Get(hashedFile, &data)) { if (mLibraries.Get(hashedFile, &data)) {
NS_ASSERTION(data.module, "Corrupt mLibraries hash"); NS_ASSERTION(data.module, "Corrupt mLibraries hash");

Просмотреть файл

@ -61,6 +61,8 @@ class nsNativeModuleLoader : public nsIModuleLoader
private: private:
struct NativeLoadData struct NativeLoadData
{ {
NativeLoadData() : library(nsnull) { }
nsCOMPtr<nsIModule> module; nsCOMPtr<nsIModule> module;
PRLibrary *library; PRLibrary *library;
}; };