we only notify the plugin instance via the plugin host and only if the notify
data is non-null. git-svn-id: svn://10.0.0.236/trunk@11466 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -226,35 +226,6 @@ NS_IMETHODIMP ns4xPluginStream::AsFile(const char* filename)
|
||||
|
||||
NS_IMETHODIMP ns4xPluginStream :: Close(void)
|
||||
{
|
||||
const NPPluginFuncs *callbacks;
|
||||
NPP npp;
|
||||
void *notifydata;
|
||||
|
||||
fInstance->GetCallbacks(&callbacks);
|
||||
fInstance->GetNPP(&npp);
|
||||
|
||||
fPeer->GetNotifyData(¬ifydata);
|
||||
|
||||
nsPluginReason reason;
|
||||
|
||||
fPeer->GetReason(&reason);
|
||||
|
||||
if (nsnull != notifydata)
|
||||
{
|
||||
if (callbacks->urlnotify == NULL)
|
||||
return NS_OK;
|
||||
|
||||
const char *url;
|
||||
|
||||
fPeer->GetURL(&url);
|
||||
|
||||
CallNPP_URLNotifyProc(callbacks->urlnotify,
|
||||
npp,
|
||||
url,
|
||||
(NPReason)reason,
|
||||
notifydata);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -544,15 +544,18 @@ NS_IMETHODIMP nsPluginStreamListener :: OnStopBinding(nsIURL* aURL, PRInt32 aSta
|
||||
|
||||
if (nsnull != instance)
|
||||
{
|
||||
const char *url;
|
||||
if (nsnull != mNotifyData)
|
||||
{
|
||||
const char *url;
|
||||
|
||||
if (nsnull != mURL)
|
||||
url = mURL->GetSpec();
|
||||
else
|
||||
url = "";
|
||||
if (nsnull != mURL)
|
||||
url = mURL->GetSpec();
|
||||
else
|
||||
url = "";
|
||||
|
||||
//XXX target is bad. MMP
|
||||
instance->URLNotify(url, "", reason, mNotifyData);
|
||||
//XXX target is bad. MMP
|
||||
instance->URLNotify(url, "", reason, mNotifyData);
|
||||
}
|
||||
|
||||
NS_RELEASE(instance);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user