diff --git a/mozilla/modules/plugin/base/src/ns4xPluginStream.cpp b/mozilla/modules/plugin/base/src/ns4xPluginStream.cpp index e60c894d753..edeb366d756 100644 --- a/mozilla/modules/plugin/base/src/ns4xPluginStream.cpp +++ b/mozilla/modules/plugin/base/src/ns4xPluginStream.cpp @@ -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; } diff --git a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp index 1e85c5d5442..cdbe499a67b 100644 --- a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -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); } diff --git a/mozilla/modules/plugin/nglsrc/ns4xPluginStream.cpp b/mozilla/modules/plugin/nglsrc/ns4xPluginStream.cpp index e60c894d753..edeb366d756 100644 --- a/mozilla/modules/plugin/nglsrc/ns4xPluginStream.cpp +++ b/mozilla/modules/plugin/nglsrc/ns4xPluginStream.cpp @@ -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; } diff --git a/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp b/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp index 1e85c5d5442..cdbe499a67b 100644 --- a/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp @@ -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); }