Closed Bug 937130 Opened 11 years ago Closed 11 years ago

APZCTM::CommonAncestor doesn't acquire the tree lock

Categories

(Core :: Panning and Zooming, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file, 1 obsolete file)

The CommonAncestor function in APZCTreeManager should be holding the tree lock as it walks around in the tree, but currently does not.
Also RootAPZCForLayersId and GetInputTransforms
Attached patch WIP (obsolete) — Splinter Review
Needs testing
Assignee: nobody → bugmail.mozilla
Blocks: 937129
Attached patch PatchSplinter Review
https://tbpl.mozilla.org/?tree=Try&rev=84cf2aded158 is looking green so far
Attachment #830202 - Attachment is obsolete: true
Comment on attachment 830373 [details] [diff] [review]
Patch

Tested on a B2G debug build to ensure none of the assertions are tripping.
Attachment #830373 - Flags: review?(botond)
Comment on attachment 830373 [details] [diff] [review]
Patch

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

::: gfx/layers/composite/APZCTreeManager.cpp
@@ +447,5 @@
>                                ScrollableLayerGuid* aOutTargetGuid,
>                                WidgetInputEvent* aOutEvent)
>  {
> +  MOZ_ASSERT(NS_IsMainThread());
> +

ProcessTouchEvent(), ProcessMouseEvent() and ProcessEvent() look like private helpers for the WidgetInputEvent overloads of ReceiveInputEvent(), which already assert this. Is there value in asserting again in the helpers?
Attachment #830373 - Flags: review?(botond) → review+
I added the asserts to the private helpers because (a) when looking at the function in isolation it's more obvious which thread it's running on and (b) in case code is added to invoke the private helpers from some other method the assertions might catch errors.
https://hg.mozilla.org/mozilla-central/rev/c592e423be9d
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: