Attempt to fix some plugin leaks. Bug 302737, r+sr=jst, a=schrep
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@203220 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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<nsIPluginStreamListener> listener;
|
||||
if (target == nsnull)
|
||||
((ns4xPluginInstance*)inst)->NewNotifyStream(&listener, notifyData,
|
||||
((ns4xPluginInstance*)inst)->NewNotifyStream(getter_AddRefs(listener),
|
||||
notifyData,
|
||||
bDoNotify, relativeURL);
|
||||
|
||||
switch (type) {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user