Bug 626608: Make sure plugin is in a state to receive callbacks before calling NPP_UrlRedirectNotify. r=bsmedberg a=blocking2.0final+
authorJosh Aas <joshmoz@gmail.com>
Thu, 03 Feb 2011 16:45:33 -0800
changeset 61933 a82d1ab8f0100729dd62c5bcd15100f288ee73b2
parent 61932 51f36c6a7d38cf27d2a64078832bef4b7b507fcb
child 61934 958c71be62e043eecfab41b7b9fc3142e8366e12
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersbsmedberg, blocking2
bugs626608
milestone2.0b12pre
Bug 626608: Make sure plugin is in a state to receive callbacks before calling NPP_UrlRedirectNotify. r=bsmedberg a=blocking2.0final+
modules/plugin/base/src/nsNPAPIPluginStreamListener.cpp
--- a/modules/plugin/base/src/nsNPAPIPluginStreamListener.cpp
+++ b/modules/plugin/base/src/nsNPAPIPluginStreamListener.cpp
@@ -839,17 +839,17 @@ nsNPAPIPluginStreamListener::HandleRedir
                                                         nsIAsyncVerifyRedirectCallback* callback)
 {
   nsCOMPtr<nsIHttpChannel> oldHttpChannel = do_QueryInterface(oldChannel);
   nsCOMPtr<nsIHttpChannel> newHttpChannel = do_QueryInterface(newChannel);
   if (!oldHttpChannel || !newHttpChannel) {
     return false;
   }
 
-  if (!mInst) {
+  if (!mInst || !mInst->CanFireNotifications()) {
     return false;
   }
 
   nsNPAPIPlugin* plugin = mInst->GetPlugin();
   if (!plugin || !plugin->GetLibrary()) {
     return false;
   }