diff --git a/mozilla/docshell/base/nsDSURIContentListener.cpp b/mozilla/docshell/base/nsDSURIContentListener.cpp index 7b75af87c0b..73391d37b95 100644 --- a/mozilla/docshell/base/nsDSURIContentListener.cpp +++ b/mozilla/docshell/base/nsDSURIContentListener.cpp @@ -27,7 +27,8 @@ //*** nsDSURIContentListener: Object Management //***************************************************************************** -nsDSURIContentListener::nsDSURIContentListener() : mDocShell(nsnull) +nsDSURIContentListener::nsDSURIContentListener() : mDocShell(nsnull), + mParentContentListener(nsnull) { NS_INIT_REFCNT(); } @@ -138,6 +139,7 @@ void nsDSURIContentListener::GetParentContentListener(nsIURIContentListener** void nsDSURIContentListener::SetParentContentListener(nsIURIContentListener* aParentListener) { + // Weak Reference, don't addref mParentContentListener = aParentListener; } diff --git a/mozilla/docshell/base/nsDSURIContentListener.h b/mozilla/docshell/base/nsDSURIContentListener.h index 0c7f7a5ca14..d4904354424 100644 --- a/mozilla/docshell/base/nsDSURIContentListener.h +++ b/mozilla/docshell/base/nsDSURIContentListener.h @@ -53,8 +53,9 @@ protected: protected: nsDocShell* mDocShell; - nsCOMPtr mParentContentListener; nsCOMPtr mPresContext; + + nsIURIContentListener* mParentContentListener; // Weak Reference }; #endif /* nsDSURIContentListener_h__ */