Start onResume() observers in a Runnable

RESOLVED FIXED in mozilla14

Status

()

Core
Widget: Android
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: mounir, Assigned: mounir)

Tracking

Trunk
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 607519 [details] [diff] [review]
Patch v1

Bug 720795 is adding a third observer that is started when onResume() is called which creates a startup regression. I believe we could fix that by starting all observers in a runnable. We don't really care if the event comes a few ms later.
Actually, I believe this patch might improve our startup time of a few milliseconds.
Attachment #607519 - Flags: review?(doug.turner)
(Assignee)

Comment 1

6 years ago
Actually, if onPause() is called just after onResume() and before the Runnable is executed, we might end up in unknown state. Though, both are callbacks called by the system. Can we safely assume the runnable will be always called between those? Even more given that onPause() is called when the app is put in background which means that it requires a user interaction.
OS: Linux → All
Hardware: x86_64 → All
(Assignee)

Updated

6 years ago
Whiteboard: [needs review]

Updated

6 years ago
Attachment #607519 - Flags: review?(doug.turner) → review+

Updated

6 years ago
Whiteboard: [needs review]
(Assignee)

Comment 2

6 years ago
https://hg.mozilla.org/mozilla-central/rev/bde5f8aaa7e4
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in before you can comment on or make changes to this bug.