Fix error reporting in WebAudioDecodeJob::OnFailure
Categories
(Core :: Web Audio, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: koalab1999)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Right now this code does the following:
- Grab a localized string for the error.
- Report that to the console.
- Pass a DOMException whose message is the name of that localized string (!) to the callback.
- Reject the promise with a generic EncodingError DOMException.
It seems like we should be passing a sane (but NOT localized) string to both the DOMException and the Promise. One plausible thing to do is to pull these error messages out of the localized stuff completely, remove the manual console log, and just do the Promise rejection; if the page does not handle it I believe we will log it in the console.
Updated•5 years ago
|
![]() |
Reporter | |
Updated•5 years ago
|
Changed error message to unlocalized in the callback and in the promise rejection in case an error occurs in audio decoding.
The result can be seen by looking at the console of this code https://jsfiddle.net/carnould/kzsc6xr0/27/
I don't know if it needs a proper test or how the localized message can be deleted in all languages.
Updated•5 years ago
|
The test is skipped because we don't give the appropriate error to WebAudioDecodeJob::OnFailure()
Depends on D81337
Comment 4•5 years ago
|
||
![]() |
||
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/613fb2320c9c
https://hg.mozilla.org/mozilla-central/rev/ce92439ba700
https://hg.mozilla.org/mozilla-central/rev/e0b4821cde64
Description
•