Closed Bug 1129133 Opened 9 years ago Closed 9 years ago

Clean up GeckoTouchDispatcher so that it's a real singleton

Categories

(Core Graveyard :: Widget: Gonk, defect)

37 Branch
ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox39 fixed)

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: mchang, Assigned: mchang)

Details

Attachments

(1 file, 3 obsolete files)

Right now the GeckoTouchDispatcher is a quasi-singleton. Clean it up a little so that it's a real one.
Cleans up the GeckoTouchDispatcher so that it is a singleton and remove the static methods and make them non-static.
Adds a reference to the GeckoTouchDispatcher from the CompositorVsyncObserver. Waiting on try to make sure ClearOnShutdown, which executes on the main thread, is actually the last reference and not the CompositorVsyncObserver.
Attachment #8559526 - Flags: review?(mwu)
Comment on attachment 8559527 [details] [diff] [review]
Part 2: Add a reference to the GeckoTouchDispatcher in the CompositorVsyncObserver

Verified that ClearOnShutdown executes the last reference and the GeckoTouchDispatcher is cleaned up on the main thread.
Attachment #8559527 - Flags: review?(bugmail.mozilla)
Comment on attachment 8559527 [details] [diff] [review]
Part 2: Add a reference to the GeckoTouchDispatcher in the CompositorVsyncObserver

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

Do you need to keep a ref locally? I'd rather if you just called GeckoTouchDispatcher::GetInstance()->whatever where you need it. I worry about cyclical references and doing this would avoid that problem.
Attachment #8559527 - Flags: review?(bugmail.mozilla)
From comment 4, updated to use GetInstance() instead of holding a reference.
Attachment #8559527 - Attachment is obsolete: true
Attachment #8560178 - Flags: review?(bugmail.mozilla)
Comment on attachment 8560178 [details] [diff] [review]
Part 2: Use GeckoTouchDispatcher singleton instead of static methods

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

Please squash both parts into one patch when landing as neither will compile by itself.
Attachment #8560178 - Flags: review?(bugmail.mozilla) → review+
Attachment #8559526 - Flags: review?(mwu) → review+
Carrying r+, squashed into 1 from comment 6.

https://hg.mozilla.org/integration/b2g-inbound/rev/74794349faa8
Attachment #8559526 - Attachment is obsolete: true
Attachment #8560178 - Attachment is obsolete: true
Attachment #8568768 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/74794349faa8
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: