Closed Bug 1076915 Opened 5 years ago Closed 5 years ago

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

Categories

(Core :: Panning and Zooming, defect)

All
Gonk (Firefox OS)
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: kats, Assigned: kats)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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.
Attached patch Add assertionSplinter Review
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
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.