Enforce contract that GeckoContentController::PostDelayedTask is always called on the controller thread

RESOLVED FIXED in mozilla35

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: kats, Assigned: kats)

Tracking

(Blocks: 1 bug)

Trunk
mozilla35
All
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

The GeckoContentController::PostDelayedTask function (and AsyncPanZoomController::PostDelayedTask, which calls it) is always meant to be called on the controller thread. All the implementations of this interface method assume as much. I didn't realize this in my first approach to fixing bug 1061142. Botond caught my mistake (thanks!) and suggested it would be good to assert this somehow.
Created attachment 8498907 [details] [diff] [review]
Add assertion

I verified all the current callsites of this function are on the controller thread.
Attachment #8498907 - Flags: review?(botond)
Comment on attachment 8498907 [details] [diff] [review]
Add assertion

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

Thanks!

::: gfx/layers/apz/public/GeckoContentController.h
@@ +86,5 @@
>  
>    /**
>     * Schedules a runnable to run on the controller/UI thread at some time
>     * in the future.
> +   * This method will always be called on the controller thread.

s/will/must
Attachment #8498907 - Flags: review?(botond) → review+
https://hg.mozilla.org/mozilla-central/rev/e4165ab15b4e
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.