Open Bug 1902676 Opened 2 months ago Updated 2 months ago

Fairly annoying exceptions get reported when reading from a single-file archive

Categories

(Firefox :: Profile Backup, task, P3)

task

Tracking

()

People

(Reporter: mconley, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fidefe-device-migration])

When reading the JSON and binary blocks from the single-file archive, we use the nsIStreamConverter and an nsIStreamListener to parse the multi-part MIME message. When we want to abort reading the file (for example, if we only want the JSON block and not the binary block when sampling the archive), we throw NS_BINDING_ABORTED exceptions:

See:

This results in the following getting sent to the console, unsurpisingly:

JavaScript error: resource:///modules/backup/BackupService.sys.mjs, line 1385: NS_BINDING_ABORTED: Got JSON block. Aborting further reads.
JavaScript error: resource:///modules/backup/BackupService.sys.mjs, line 1385: NS_BINDING_ABORTED: Got JSON block. Aborting further reads.
JavaScript error: resource:///modules/backup/BackupService.sys.mjs, line 259: NS_BINDING_ABORTED: Got binary block - cancelling loading the multipart stream.

We should find a way of suppressing this. Surely there's a way we can abort these reads without causing an exception to get logged.

You need to log in before you can comment on or make changes to this bug.