diff --git a/modules/libpref/src/nsPref.cpp b/modules/libpref/src/nsPref.cpp index 88c01cedc66..f82dd8945f0 100644 --- a/modules/libpref/src/nsPref.cpp +++ b/modules/libpref/src/nsPref.cpp @@ -48,6 +48,7 @@ #include "nsISecurityPref.h" #include "nsIPrefService.h" #include "nsISupportsPrimitives.h" +#include "nsWeakReference.h" #include "nsIJSRuntimeService.h" #include "nsIModule.h" @@ -63,7 +64,8 @@ class nsPref : public nsIPref, public nsIObserver, public nsIPrefBranch, public nsIPrefBranchInternal, - public nsISecurityPref + public nsISecurityPref, + public nsSupportsWeakReference { public: static nsPref *GetInstance(); @@ -124,7 +126,7 @@ nsPref* nsPref::gInstance = NULL; static PRInt32 g_InstanceCount = 0; -NS_IMPL_THREADSAFE_ISUPPORTS6(nsPref, nsIPref, nsIPrefService, nsIObserver, nsIPrefBranch, nsIPrefBranchInternal, nsISecurityPref); +NS_IMPL_THREADSAFE_ISUPPORTS7(nsPref, nsIPref, nsIPrefService, nsIObserver, nsIPrefBranch, nsIPrefBranchInternal, nsISecurityPref, nsISupportsWeakReference); //---------------------------------------------------------------------------------------- nsPref::nsPref() diff --git a/modules/libpref/src/nsPrefBranch.cpp b/modules/libpref/src/nsPrefBranch.cpp index 2f758b51267..dbc4d057938 100644 --- a/modules/libpref/src/nsPrefBranch.cpp +++ b/modules/libpref/src/nsPrefBranch.cpp @@ -142,6 +142,7 @@ NS_INTERFACE_MAP_BEGIN(nsPrefBranch) NS_INTERFACE_MAP_ENTRY(nsIPrefBranch) NS_INTERFACE_MAP_ENTRY(nsIPrefBranchInternal) NS_INTERFACE_MAP_ENTRY(nsISecurityPref) + NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference) NS_INTERFACE_MAP_END diff --git a/modules/libpref/src/nsPrefBranch.h b/modules/libpref/src/nsPrefBranch.h index b7caf005fd8..378fd78f7f0 100644 --- a/modules/libpref/src/nsPrefBranch.h +++ b/modules/libpref/src/nsPrefBranch.h @@ -31,10 +31,12 @@ #include "nsISupportsPrimitives.h" #include "nsString.h" #include "nsVoidArray.h" +#include "nsWeakReference.h" class nsPrefBranch : public nsIPrefBranch, public nsIPrefBranchInternal, - public nsISecurityPref + public nsISecurityPref, + public nsSupportsWeakReference { public: NS_DECL_ISUPPORTS diff --git a/modules/libpref/src/nsPrefService.cpp b/modules/libpref/src/nsPrefService.cpp index a6fd7bbdb76..0e6a128e42d 100644 --- a/modules/libpref/src/nsPrefService.cpp +++ b/modules/libpref/src/nsPrefService.cpp @@ -97,6 +97,7 @@ NS_INTERFACE_MAP_BEGIN(nsPrefService) NS_INTERFACE_MAP_ENTRY(nsIObserver) NS_INTERFACE_MAP_ENTRY(nsIPrefBranch) NS_INTERFACE_MAP_ENTRY(nsIPrefBranchInternal) + NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference) NS_INTERFACE_MAP_END diff --git a/modules/libpref/src/nsPrefService.h b/modules/libpref/src/nsPrefService.h index 7260f9217a2..12981298754 100644 --- a/modules/libpref/src/nsPrefService.h +++ b/modules/libpref/src/nsPrefService.h @@ -26,13 +26,15 @@ #include "nsIPrefBranchInternal.h" #include "nsIObserver.h" #include "nsCOMPtr.h" +#include "nsWeakReference.h" class nsIFile; class nsPrefService : public nsIPrefService, public nsIObserver, public nsIPrefBranch, - public nsIPrefBranchInternal + public nsIPrefBranchInternal, + public nsSupportsWeakReference { public: NS_DECL_ISUPPORTS