Bug 1235183. Part 2 - remove unnecessary null-checks. r=cpearce

MozReview-Commit-ID: 6XZMrjw440L

--HG--
extra : rebase_source : 02379fe62db21a6e7c804c76602e314dcf84178d
This commit is contained in:
JW Wang 2016-06-23 17:15:50 +08:00
Родитель 160b32e792
Коммит 1377c9112b
1 изменённых файлов: 1 добавлений и 2 удалений

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

@ -383,13 +383,12 @@ HTMLMediaElement::MediaLoadListener::OnStartRequest(nsIRequest* aRequest,
nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
if (channel &&
element &&
NS_SUCCEEDED(rv = element->InitializeDecoderForChannel(channel, getter_AddRefs(mNextListener))) &&
mNextListener) {
rv = mNextListener->OnStartRequest(aRequest, aContext);
} else {
// If InitializeDecoderForChannel() returned an error, fire a network error.
if (NS_FAILED(rv) && !mNextListener && element) {
if (NS_FAILED(rv) && !mNextListener) {
// Load failed, attempt to load the next candidate resource. If there
// are none, this will trigger a MEDIA_ERR_SRC_NOT_SUPPORTED error.
element->NotifyLoadError();