From f35fbea133196f3adc77a19c2e9db04927fbd609 Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Sat, 12 Sep 1998 19:25:28 +0000 Subject: [PATCH] Register libraries with the refcnt tracer --- xpcom/components/nsRepository.cpp | 5 +++++ xpcom/src/nsRepository.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/xpcom/components/nsRepository.cpp b/xpcom/components/nsRepository.cpp index 60f9ea97ac8..ef4c63230f5 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 60f9ea97ac8..ef4c63230f5 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) {