Closed
Bug 800247
Opened 13 years ago
Closed 13 years ago
[b2g-bluetooth] User has no way of knowing when device disconnects.
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
People
(Reporter: qdot, Assigned: qdot)
References
Details
Attachments
(1 file)
|
6.24 KB,
patch
|
cjones
:
review+
echou
:
review+
|
Details | Diff | Splinter Review |
Repro:
1. Connect to paired, powered on device
2. Power off device
Expected:
Disconnection is relayed to gaia
Actual:
Gaia says still connected
| Assignee | ||
Comment 1•13 years ago
|
||
Attachment #670252 -
Flags: review?(jones.chris.g)
| Assignee | ||
Comment 2•13 years ago
|
||
Comment on attachment 670252 [details] [diff] [review]
Patch 1 (v1) - Add disconnect events to UnixSocket, update Bluetooth*Manager
cjones for unixsocket stuff, echou for manager stuff (not that there's much of it really)
Attachment #670252 -
Flags: review?(echou)
Comment 3•13 years ago
|
||
Comment on attachment 670252 [details] [diff] [review]
Patch 1 (v1) - Add disconnect events to UnixSocket, update Bluetooth*Manager
Review of attachment 670252 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me.
Attachment #670252 -
Flags: review?(echou) → review+
Comment on attachment 670252 [details] [diff] [review]
Patch 1 (v1) - Add disconnect events to UnixSocket, update Bluetooth*Manager
>diff --git a/ipc/unixsocket/UnixSocket.cpp b/ipc/unixsocket/UnixSocket.cpp
>@@ -608,7 +632,8 @@ UnixSocketImpl::OnFileCanReadWithoutBlocking(int aFd)
> mIncoming.forget();
> mReadWatcher.StopWatchingFileDescriptor();
> mWriteWatcher.StopWatchingFileDescriptor();
>- mConsumer->CloseSocket();
>+ nsRefPtr<SocketCloseTask> t = new SocketCloseTask(this);
>+ NS_DispatchToMainThread(t);
It doesn't matter here, but a good habit to be in is to use
NS_DispatchToMainThread(new SocketCloseTask(this));
to ensure that the destructor for your task runs on the main thread,
not accidentally on the dispatching thread. (Note that you're holding
a strong ref here in the dispatcher.)
I can't tell you how much gnashing of teeth and rending of garments
I've seen from those kinds of bugs! And I bet bent could tell you
even more great stories about those over beer sometime.
Attachment #670252 -
Flags: review?(jones.chris.g) → review+
| Assignee | ||
Comment 6•13 years ago
|
||
Comment 7•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9d5627f5882b
Should this have a test?
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Comment 8•13 years ago
|
||
status-firefox18:
--- → fixed
status-firefox19:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•