Bug 1398659. P3 - ChannelMediaResource::Open() is a no-op for a cloned resource. r=gerald
authorJW Wang <jwwang@mozilla.com>
Tue, 05 Sep 2017 17:35:24 +0800
changeset 429486 2a71c9276c31863aee681682b78679437f94fe70
parent 429485 3928ea56c1d334d0b5e550639004bec6a6b27dda
child 429487 bd93f2e8986baa83c634612dc013a4d42781b09d
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1398659
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1398659. P3 - ChannelMediaResource::Open() is a no-op for a cloned resource. r=gerald 1. mChannel is null. 2. mCacheStream has been initialized by InitAsClone(). So ChannelMediaDecoder::Load() doesn't need to call OpenResource(nullptr) at all. MozReview-Commit-ID: FeARp9fu65L
dom/media/ChannelMediaDecoder.cpp
--- a/dom/media/ChannelMediaDecoder.cpp
+++ b/dom/media/ChannelMediaDecoder.cpp
@@ -278,19 +278,16 @@ ChannelMediaDecoder::Load(BaseMediaResou
     return NS_ERROR_FAILURE;
   }
 
   nsresult rv = MediaShutdownManager::Instance().Register(this);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
-  rv = OpenResource(nullptr);
-  NS_ENSURE_SUCCESS(rv, rv);
-
   SetStateMachine(CreateStateMachine());
   NS_ENSURE_TRUE(GetStateMachine(), NS_ERROR_FAILURE);
 
   return InitializeStateMachine();
 }
 
 void
 ChannelMediaDecoder::NotifyDownloadEnded(nsresult aStatus)