Closed Bug 1020300 Opened 11 years ago Closed 10 years ago

Dispatch part of AdapterStateChangedCallback to main thread

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ben.tian, Assigned: jaliu)

References

Details

(Whiteboard: [webbt-api])

Attachments

(1 file, 2 obsolete files)

Bug 1019372 avoids accessing static variable from different thread by dispatching part of each callback to main thread. However bug 1006308 adds a new static runnable array that makes part of AdapterStateChangeCallback have to run on main thread. This fix will be similar to bug 1019372 patch 6.
Whiteboard: [webbt-api]
Jamin, please help on this bug. Thanks.
Assignee: nobody → jaliu
Status: NEW → ASSIGNED
Attachment #8442721 - Flags: review?(btian)
Comment on attachment 8442721 [details] [diff] [review] Dispatch part of AdapterStateChangedCallback to main thread. (v1) Review of attachment 8442721 [details] [diff] [review]: ----------------------------------------------------------------- r=me with comment addressed. Thanks. ::: dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp @@ +567,5 @@ > BT_WARNING("Failed to dispatch to main thread!"); > } > } > > +class AdapterStateChangedCallbackTask MOZ_FINAL : public nsRunnable Move this task to right before |AdapterStateChangeCallback|, as |DiscoveryStateChangedCallbackTask| before |DiscoveryStateChangedCallback|. @@ +575,5 @@ > + Run() > + { > + MOZ_ASSERT(NS_IsMainThread()); > + > + // Resolve promise if existed nit: extra space.
Attachment #8442721 - Flags: review?(btian) → review+
(In reply to Ben Tian [:btian] from comment #3) Thank you for your reviews.
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: