diff --git a/xpcom/components/nsRepository.cpp b/xpcom/components/nsRepository.cpp index 60f9ea97ac8f..ef4c63230f50 100644 --- a/xpcom/components/nsRepository.cpp +++ b/xpcom/components/nsRepository.cpp @@ -234,6 +234,11 @@ nsresult nsRepository::loadFactory(FactoryEntry *aEntry, aEntry->instance = PR_LoadLibrary(aEntry->library); } if (aEntry->instance != NULL) { +#ifdef MOZ_TRACE_XPCOM_REFCNT + // Inform refcnt tracer of new library so that calls through the + // new library can be traced. + nsTraceRefcnt::LoadLibrarySymbols(aEntry->library, aEntry->instance); +#endif nsFactoryProc proc = (nsFactoryProc) PR_FindSymbol(aEntry->instance, "NSGetFactory"); if (proc != NULL) { diff --git a/xpcom/src/nsRepository.cpp b/xpcom/src/nsRepository.cpp index 60f9ea97ac8f..ef4c63230f50 100644 --- a/xpcom/src/nsRepository.cpp +++ b/xpcom/src/nsRepository.cpp @@ -234,6 +234,11 @@ nsresult nsRepository::loadFactory(FactoryEntry *aEntry, aEntry->instance = PR_LoadLibrary(aEntry->library); } if (aEntry->instance != NULL) { +#ifdef MOZ_TRACE_XPCOM_REFCNT + // Inform refcnt tracer of new library so that calls through the + // new library can be traced. + nsTraceRefcnt::LoadLibrarySymbols(aEntry->library, aEntry->instance); +#endif nsFactoryProc proc = (nsFactoryProc) PR_FindSymbol(aEntry->instance, "NSGetFactory"); if (proc != NULL) {