diff --git a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp index e53848f0121..c629c248f47 100644 --- a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp +++ b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp @@ -1080,9 +1080,10 @@ MakeNew4xStreamInternal(NPP npp, const char *relativeURL, const char *target, NS_ASSERTION(pm, "failed to get plugin manager"); if (!pm) return NPERR_GENERIC_ERROR; - nsIPluginStreamListener* listener = nsnull; + nsCOMPtr listener; if (target == nsnull) - ((ns4xPluginInstance*)inst)->NewNotifyStream(&listener, notifyData, + ((ns4xPluginInstance*)inst)->NewNotifyStream(getter_AddRefs(listener), + notifyData, bDoNotify, relativeURL); switch (type) { diff --git a/mozilla/modules/plugin/base/src/ns4xPluginInstance.cpp b/mozilla/modules/plugin/base/src/ns4xPluginInstance.cpp index daf7215ee78..067b7542e6f 100644 --- a/mozilla/modules/plugin/base/src/ns4xPluginInstance.cpp +++ b/mozilla/modules/plugin/base/src/ns4xPluginInstance.cpp @@ -231,11 +231,6 @@ void ns4xPluginStreamListener::CallURLNotify(NPReason reason) ("NPP URLNotify called: this=%p, npp=%p, notify=%p, reason=%d, url=%s\n", this, npp, mNotifyData, reason, mNotifyURL)); } - - // Let's not leak this stream listener. Release the reference to the stream listener - // added for the notify callback in NewNotifyStream. - // Note: This may destroy us if we are not being destroyed already. - NS_RELEASE_THIS(); }