Closed
Bug 1020300
Opened 11 years ago
Closed 10 years ago
Dispatch part of AdapterStateChangedCallback to main thread
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
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.
Reporter | ||
Updated•11 years ago
|
Depends on: 1019372, webbt-api-onoff
Whiteboard: [webbt-api]
Assignee | ||
Updated•10 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8442721 -
Flags: review?(btian)
Reporter | ||
Comment 3•10 years ago
|
||
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+
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8442721 -
Attachment is obsolete: true
Assignee | ||
Comment 5•10 years ago
|
||
(In reply to Ben Tian [:btian] from comment #3)
Thank you for your reviews.
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Reporter | ||
Comment 7•10 years ago
|
||
Keywords: checkin-needed
Comment 8•10 years ago
|
||
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.
Description
•