Bug 1398659. P8 - remove the call to mCacheStream.NotifyDataLength() from OpenChannel(). r=gerald

MediaCacheStream::mStreamLength has been set either in Init() or InitAsClone().

MozReview-Commit-ID: L259ecDgjN7

--HG--
extra : rebase_source : 7df74d388808492faac73c3e41a972cb22cdb187
extra : intermediate-source : d834e02c15ed9361a02977349459fad079910642
extra : source : 45df347e1fd6b67d60212f2d87312d597656a7d6
This commit is contained in:
JW Wang 2017-09-07 15:23:57 +08:00
Родитель fff2af86d2
Коммит f6430f39ef
1 изменённых файлов: 0 добавлений и 12 удалений

Просмотреть файл

@ -549,18 +549,6 @@ ChannelMediaResource::OpenChannel()
MOZ_ASSERT(mChannel);
MOZ_ASSERT(!mListener, "Listener should have been removed by now");
// Set the content length, if it's available as an HTTP header.
// This ensures that MediaResource wrapping objects for platform libraries
// that expect to know the length of a resource can get it before
// OnStartRequest() fires.
nsCOMPtr<nsIHttpChannel> hc = do_QueryInterface(mChannel);
if (hc && !IsPayloadCompressed(hc)) {
int64_t cl = -1;
if (NS_SUCCEEDED(hc->GetContentLength(&cl)) && cl != -1) {
mCacheStream.NotifyDataLength(cl);
}
}
mListener = new Listener(this);
nsresult rv = mChannel->SetNotificationCallbacks(mListener.get());
NS_ENSURE_SUCCESS(rv, rv);