Closed Bug 1150722 Opened 9 years ago Closed 9 years ago

Triggering log capture activity shows empty form

Categories

(Firefox OS Graveyard :: Gaia::Bugzilla Lite, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.2 S9 (3apr)

People

(Reporter: daleharvey, Assigned: daleharvey)

References

Details

(Whiteboard: [systemsfe])

Attachments

(1 file)

      No description provided.
Race condition between creating the page and handling the activity in https://github.com/mozilla-b2g/bzlite/blob/master/lib/app.js#L172
Component: Gaia::Feedback → Bugzilla Lite
Blocks: 1134701
Assignee: nobody → dale
The issue here was, on load page('/create/') gets called any time, page('/create/') was then triggered by the activity handler which is completely valid (we dont want to wait on a possible activity before rendering)

However occasionally we set app.activity before the first render completed, this meant the first render picked up the activity, displayed its data, then the /create/ triggered by the activity showed an empty form
Attachment #8587707 - Flags: review?(drs)
Comment on attachment 8587707 [details] [review]
https://github.com/mozilla-b2g/bzlite/pull/5

There's still a bit of remaining racyness that I'm not comfortable with. I think that fixing this would also improve code flow and make it more clear what's going on.
Attachment #8587707 - Flags: review?(drs) → review-
Comment on attachment 8587707 [details] [review]
https://github.com/mozilla-b2g/bzlite/pull/5

If the init flow gets more complicated we can have it be a promise, but adding the activity handler once init is completed is a lot cleaner and lets us get rid of the initCalled check. 

Good catch, cheers
Attachment #8587707 - Flags: review- → review?(drs)
Sweet cheers

https://github.com/mozilla-b2g/bzlite/commit/7d972794d99d2a9511e5247fd688b309f214575d
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [systemsfe]
Target Milestone: --- → 2.2 S9 (3apr)
Blocks: 1151963
No longer blocks: 1151963
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: