Bug 1152890 - Add missing state transition to nsNPAPIPluginStreamListener. r=jimm, a=lizzard
authorAaron Klotz <aklotz@mozilla.com>
Thu, 09 Apr 2015 10:04:52 -0600
changeset 265552 65ab6d27be5a3f2dd9460a7210a83da3520854f5
parent 265551 77b9d633dfb9657adfbcd208d408de4fbbafe6f2
child 265553 15230953af6e57b0c78203d7edd5b1d1b1e23c04
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm, lizzard
bugs1152890
milestone39.0a2
Bug 1152890 - Add missing state transition to nsNPAPIPluginStreamListener. r=jimm, a=lizzard
dom/plugins/base/nsNPAPIPluginStreamListener.cpp
--- a/dom/plugins/base/nsNPAPIPluginStreamListener.cpp
+++ b/dom/plugins/base/nsNPAPIPluginStreamListener.cpp
@@ -327,16 +327,18 @@ nsNPAPIPluginStreamListener::OnStartBind
   
   NPP_PLUGIN_LOG(PLUGIN_LOG_NORMAL,
                  ("NPP NewStream called: this=%p, npp=%p, mime=%s, seek=%d, type=%d, return=%d, url=%s\n",
                   this, npp, (char *)contentType, seekable, streamType, error, mNPStreamWrapper->mNPStream.url));
   
   if (error != NPERR_NO_ERROR)
     return NS_ERROR_FAILURE;
 
+  mStreamState = eNewStreamCalled;
+
   if (streamType == nsPluginStreamListenerPeer::STREAM_TYPE_UNKNOWN) {
     SuspendRequest();
   }
   if (!SetStreamType(streamType, false)) {
     return NS_ERROR_FAILURE;
   }
 
   return NS_OK;