Closed Bug 1382861 Opened 7 years ago Closed 7 years ago

Limit priority queue usage

Categories

(Core Graveyard :: Widget: Android, enhancement)

All
Android
enhancement
Not set
normal

Tracking

(firefox56 fixed)

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: jchen, Assigned: jchen)

Details

Attachments

(2 files)

We should only use the nsAppShell priority queue (i.e. nsAppShell::PostEvent) for input and timing-sensitive tasks. All other tasks should go through the XPCOM queue (e.g. NS_DispatchToMainThread).
The native binding code used `jni::AbstractCall` as the interface
between `ProxyNativeCall` and `DispatchToGeckoPriorityQueue`. However,
we already make use of `nsIRunnable` for dispatching to the XPCOM queue,
so we should just use `nsIRunnable` for the priority queue as well.
Attachment #8888849 - Flags: review?(esawin)
Use the regular XPCOM queue for those tasks because the priority queue
should only be used for input and other timing-sensitive tasks.
Attachment #8888850 - Flags: review?(esawin)
Attachment #8888849 - Flags: review?(esawin) → review+
Attachment #8888850 - Flags: review?(esawin) → review+
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9c322ac1b41d
1. Replace jni::AbstractCall with nsIRunnable; r=esawin
https://hg.mozilla.org/integration/mozilla-inbound/rev/9e9270da4f55
2. Don't use priority queue for GeckoView.Window and ThumbnailHelper; r=esawin
https://hg.mozilla.org/mozilla-central/rev/9c322ac1b41d
https://hg.mozilla.org/mozilla-central/rev/9e9270da4f55
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.