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:
michaelp%netscape.com
1998-09-29 22:47:42 +00:00
parent 373f454837
commit b53c67c4da
4 changed files with 20 additions and 72 deletions

View File

@@ -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(&notifydata);
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;
}

View File

@@ -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);
}