In bug 1005446, evt.js emit was changed to async notify listeners, but this was actually not idiomatic with other emit implementations, including the DOM, so change it back to synchronously emit. In theory, little should change, but it does mean async control flow could be ordered differently, so this should not be uplifted to other branches, but rather just taken forward on master.
Created attachment 8571671 [details] [review] [gaia] jrburke:bug1138725-email-evt-sync-emit > mozilla-b2g:master
Comment on attachment 8571671 [details] [review] [gaia] jrburke:bug1138725-email-evt-sync-emit > mozilla-b2g:master Changes back to sync emit. It is the same as the one used in gelam now, but better, because it passes jshint. I also reverted the evt_test.js to the sync version of it: https://github.com/mozilla-b2g/gaia/commit/93e3fa9b7907429fe1dbcef513526a192bf6bfeb#diff-72cf748a10cdf7812401f9542982e009 as shown on the history for the file: https://github.com/mozilla-b2g/gaia/commits/master/apps/email/test/unit/evt_test.js but added a 'use strict' and removed a non-used global definition so that it passes jshint. I ran the email marionettejs and unit tests locally and they pass with this change. I also tried running the app on the device and it still works.
Pull request has landed in master: https://github.com/mozilla-b2g/gaia/commit/dd3316aba6dbc6c964b85e9634683913331f733e