Bug 1461540 - Ensure errorMessage is initialized on all code paths in WebAudioDecodeJob::OnFailure(). r=jya

Doesn't look like it's strictly necessary, but suppresses the warning.

MozReview-Commit-ID: EQBar71yNVg

--HG--
extra : rebase_source : 063639000fd47b32343d47a8ca428c134fdce43b
This commit is contained in:
Chris Pearce 2018-05-15 13:12:13 +12:00
parent a59328d28f
commit 68af64e32b

View File

@ -562,13 +562,6 @@ WebAudioDecodeJob::OnFailure(ErrorCode aErrorCode)
const char* errorMessage;
switch (aErrorCode) {
case NoError:
MOZ_FALLTHROUGH_ASSERT("Who passed NoError to OnFailure?");
// Fall through to get some sort of a sane error message if this actually
// happens at runtime.
case UnknownError:
errorMessage = "MediaDecodeAudioDataUnknownError";
break;
case UnknownContent:
errorMessage = "MediaDecodeAudioDataUnknownContentType";
break;
@ -578,6 +571,15 @@ WebAudioDecodeJob::OnFailure(ErrorCode aErrorCode)
case NoAudio:
errorMessage = "MediaDecodeAudioDataNoAudio";
break;
case NoError:
MOZ_FALLTHROUGH_ASSERT("Who passed NoError to OnFailure?");
// Fall through to get some sort of a sane error message if this actually
// happens at runtime.
case UnknownError:
MOZ_FALLTHROUGH;
default:
errorMessage = "MediaDecodeAudioDataUnknownError";
break;
}
nsIDocument* doc = nullptr;