Closed Bug 1402206 Opened 7 years ago Closed 7 years ago

Print error name for MFR::OnSeekFail

Categories

(Core :: Audio/Video: Playback, enhancement)

Other Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: alwu, Assigned: alwu)

Details

Attachments

(1 file)

Print error code couldn't effectively help people understand the reason of error, we should print its name. [1]

[1] http://searchfox.org/mozilla-central/rev/2ef8bd8a46a02c68ddbb1d5f25fa254dd7be1fbd/dom/media/MediaFormatReader.cpp#2822
Comment on attachment 8911031 [details]
Bug 1402206 - print error name for MediaFormatReader::OnSeekFailed().

https://reviewboard.mozilla.org/r/182510/#review187840

what about adding this information in HTMLMediaElement::error.message ?

::: dom/media/MediaResult.h:48
(Diff revision 1)
>  
>    nsresult Code() const { return mCode; }
> +  nsCString ErrorName() const
> +  {
> +    nsCString name;
> +    GetErrorName(mCode, static_cast<nsACString&>(name));

you don't need the cast.

not sure why the cast was added elsewhere.
Attachment #8911031 - Flags: review?(jyavenard) → review+
(In reply to Jean-Yves Avenard [:jya] from comment #2)
> ::: dom/media/MediaResult.h:48
> (Diff revision 1)
> >  
> >    nsresult Code() const { return mCode; }
> > +  nsCString ErrorName() const
> > +  {
> > +    nsCString name;
> > +    GetErrorName(mCode, static_cast<nsACString&>(name));
> 
> you don't need the cast.
> 
> not sure why the cast was added elsewhere.

OK, I'll also remove the cast in Description().
Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0916366739b8
print error name for MediaFormatReader::OnSeekFailed(). r=jya
https://hg.mozilla.org/mozilla-central/rev/0916366739b8
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: