[Email] Solidify router logic, bail on invalid messages (mainthread -> worker, and back)

RESOLVED WONTFIX

Status

Firefox OS
Gaia::E-Mail
RESOLVED WONTFIX
4 years ago
5 months ago

People

(Reporter: mcav, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

4 years ago
Created attachment 8471185 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/327

In bug 1048487, we found that we had messed up an event being tossed over the bridge (socket 'end' vs 'close'). This would have been caught with some simple logging and/or bail-on-unknown-message logic in the routing handling methods.

:asuth's notes on what we should do in this bug follow:

- have net-main.js and all of its friends have a 'default' case that throws if they see a message they don't understand.
- ensure our router logic has a try/catch mechanism in place with a hook or something so that if any of our router logic throws that we end up with the GELAM test in question failing.  This may currently fall into an 'onerror' black hole, unsure.
(Reporter)

Updated

4 years ago
See Also: → bug 1048487
(Reporter)

Comment 1

4 years ago
Created attachment 8471193 [details]
null
Attachment #8471185 - Attachment is obsolete: true

Comment 2

5 months ago
Firefox OS is not being worked on
Status: NEW → RESOLVED
Last Resolved: 5 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.