Closed Bug 1614036 Opened 5 years ago Closed 5 years ago

Fix error reporting in WebAudioDecodeJob::OnFailure

Categories

(Core :: Web Audio, defect, P3)

defect

Tracking

()

RESOLVED FIXED
81 Branch
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:

  1. Grab a localized string for the error.
  2. Report that to the console.
  3. Pass a DOMException whose message is the name of that localized string (!) to the callback.
  4. 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.

Component: Audio/Video → Web Audio
Priority: -- → P3
Assignee: bzbarsky → nobody
Blocks: dom-error

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.

Assignee: nobody → koalab1999
Status: NEW → ASSIGNED

The test is skipped because we don't give the appropriate error to WebAudioDecodeJob::OnFailure()

Depends on D81337

Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/613fb2320c9c Removed console logging and set unlocalized messages r=padenot https://hg.mozilla.org/integration/autoland/rev/ce92439ba700 Added mochitest. r=padenot
Pushed by dluca@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e0b4821cde64 Remove more error handling code that is now useless, on a CLOSED TREE.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: