If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

[email] Refactor: change emit in evt.js to synchronously call listeners

RESOLVED FIXED

Status

Firefox OS
Gaia::E-Mail
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jrburke, Assigned: jrburke)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
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.

Comment 1

3 years ago
Created attachment 8571671 [details] [review]
[gaia] jrburke:bug1138725-email-evt-sync-emit > mozilla-b2g:master
(Assignee)

Comment 2

3 years ago
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.
Attachment #8571671 - Flags: review?(bugmail)
Attachment #8571671 - Flags: review?(bugmail) → review+
(Assignee)

Updated

3 years ago
Keywords: checkin-needed

Updated

3 years ago
Keywords: checkin-needed

Comment 3

3 years ago
Pull request has landed in master: https://github.com/mozilla-b2g/gaia/commit/dd3316aba6dbc6c964b85e9634683913331f733e

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.