mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1217047 - try harder in IsContractIDRegistered to return a reasonable answer; r=bsmedberg,f=yury
This commit is contained in:
parent
f72f67ba6f
commit
a1119f9569
@ -1749,7 +1749,12 @@ nsComponentManagerImpl::IsContractIDRegistered(const char* aClass,
|
||||
nsFactoryEntry* entry = GetFactoryEntry(aClass, strlen(aClass));
|
||||
|
||||
if (entry) {
|
||||
*aResult = true;
|
||||
// UnregisterFactory might have left a stale nsFactoryEntry in
|
||||
// mContractIDs, so we should check to see whether this entry has
|
||||
// anything useful.
|
||||
*aResult = (bool(entry->mModule) ||
|
||||
bool(entry->mFactory) ||
|
||||
bool(entry->mServiceObject));
|
||||
} else {
|
||||
*aResult = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user