mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Attempt to fix some plugin leaks. Bug 302737, r+sr=jst
This commit is contained in:
parent
7dc2cda258
commit
1b2b138576
@ -923,9 +923,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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user