Closed Bug 1027135 Opened 6 years ago Closed 6 years ago

Fix PageActionLayout concurrency issues

Categories

(Firefox for Android :: General, defect)

All
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 33

People

(Reporter: bnicholson, Assigned: bnicholson)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

PageActionLayout is not thread-safe. We touch views off the main thread [1] and touch data structures (such as mPageActionList) on multiple threads [2].

The vast majority of PageActionLayout is UI-related, so the most straightforward way to fix this would be to require that all methods are called on the UI thread like other Android views.

[1] http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/toolbar/PageActionLayout.java#167
[2] http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/toolbar/PageActionLayout.java#110
Blocks: 1011712
Comment on attachment 8442547 [details] [diff] [review]
Only touch PageActionLayout on UI thread

Review of attachment 8442547 [details] [diff] [review]:
-----------------------------------------------------------------

Can you add some TheadUtils.assertOnUIThread() calls in these methods to ensure that we don't break them?
Attachment #8442547 - Flags: review?(wjohnston) → review+
Removed second argument from Bundle#getString, which API 12+ only.

https://hg.mozilla.org/integration/fx-team/rev/c4185cf15dfd
https://hg.mozilla.org/mozilla-central/rev/c4185cf15dfd
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 33
You need to log in before you can comment on or make changes to this bug.