Closed
Bug 1161020
Opened 10 years ago
Closed 10 years ago
Cleanup interface of |UnixSocketConnector|
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(firefox41 fixed)
RESOLVED
FIXED
2.2 S13 (29may)
| Tracking | Status | |
|---|---|---|
| firefox41 | --- | fixed |
People
(Reporter: tzimmermann, Assigned: tzimmermann)
References
Details
Attachments
(8 files, 9 obsolete files)
|
26.81 KB,
patch
|
qdot
:
review+
|
Details | Diff | Splinter Review |
|
7.51 KB,
patch
|
tzimmermann
:
review+
|
Details | Diff | Splinter Review |
|
14.57 KB,
patch
|
tzimmermann
:
review+
|
Details | Diff | Splinter Review |
|
15.25 KB,
patch
|
tzimmermann
:
review+
|
Details | Diff | Splinter Review |
|
16.17 KB,
patch
|
tzimmermann
:
review+
|
Details | Diff | Splinter Review |
|
14.16 KB,
patch
|
tzimmermann
:
review+
|
Details | Diff | Splinter Review |
|
18.11 KB,
patch
|
tzimmermann
:
review+
|
Details | Diff | Splinter Review |
|
27.61 KB,
patch
|
tzimmermann
:
review+
|
Details | Diff | Splinter Review |
The interface of |UnixSocketConnector| should be replaced because it is inconsistent and doesn't follow any design.
The new interface shall provide methods for
- creating a listen socket,
- creating a stream socket, and
- accepting a stream socket from a listen socket.
| Assignee | ||
Updated•10 years ago
|
Summary: Cleanup interface if |UnixSocketConnector| → Cleanup interface of |UnixSocketConnector|
| Assignee | ||
Comment 1•10 years ago
|
||
| Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8603272 -
Flags: review?(kyle)
| Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8603273 -
Flags: review?(allstars.chh)
| Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8603276 -
Flags: review?(htsai)
| Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8603277 -
Flags: review?(chuckli0706)
| Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8603278 -
Flags: review?(shuang)
| Assignee | ||
Comment 7•10 years ago
|
||
Attachment #8603279 -
Flags: review?(btian)
| Assignee | ||
Updated•10 years ago
|
Attachment #8603278 -
Attachment description: [05] Bug 1161020: Implement new socket-connector interface for Bluetooth daemon socket05_update_bluetooth_daemon.patch → [05] Bug 1161020: Implement new socket-connector interface for Bluetooth daemon socket
| Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8603281 -
Flags: review?(kyle)
| Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8603283 -
Flags: review?(kyle)
| Assignee | ||
Comment 10•10 years ago
|
||
| Assignee | ||
Comment 11•10 years ago
|
||
I tried to split up this patch set to make it easily review-able. The first patch adds a new interface for socket connectors. Patches [02] to [06] implement the interface in different existing connectors. Patch [07] converts socket classes to use the new interface. And finally patch [08] removes all old code.
Updated•10 years ago
|
Attachment #8603272 -
Flags: review?(kyle) → review+
Updated•10 years ago
|
Attachment #8603281 -
Flags: review?(kyle) → review+
Comment 12•10 years ago
|
||
Comment on attachment 8603283 [details] [diff] [review]
[08] Bug 1161020: Remove old interface and implementation from socket-connector classes
Review of attachment 8603283 [details] [diff] [review]:
-----------------------------------------------------------------
Nice! This is so much cleaner than it was. :D
Attachment #8603283 -
Flags: review?(kyle) → review+
Comment on attachment 8603277 [details] [diff] [review]
[04] Bug 1161020: Implement new socket-connector interface for key store
Review of attachment 8603277 [details] [diff] [review]:
-----------------------------------------------------------------
Awesome!
Attachment #8603277 -
Flags: review?(chuckli0706) → review+
Blocks: 1163089
Comment 14•10 years ago
|
||
Comment on attachment 8603279 [details] [diff] [review]
[06] Bug 1161020: Implement new socket-connector interface for Bluetooth sockets
Review of attachment 8603279 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM.
Attachment #8603279 -
Flags: review?(btian) → review+
Attachment #8603273 -
Flags: review?(allstars.chh) → review+
Comment on attachment 8603278 [details] [diff] [review]
[05] Bug 1161020: Implement new socket-connector interface for Bluetooth daemon socket
Review of attachment 8603278 [details] [diff] [review]:
-----------------------------------------------------------------
Hi Thomas,
Sorry for late reply. Code goods good.
::: dom/bluetooth/bluedroid/BluetoothDaemonConnector.cpp
@@ +7,5 @@
> +
> +#include "BluetoothDaemonConnector.h"
> +#include <fcntl.h>
> +#include "nsISupportsImpl.h" // For MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
> +#include "nsThreadUtils.h" // For NS_IsMainThread.
Perhaps we don't add comments for include.
@@ +227,5 @@
> +
> +bool
> +BluetoothDaemonConnector::SetUpListenSocket(int aFd)
> +{
> + return true;
I'm not sure why we directly return true. Because it's "Deprecated"? If so, can you add some comments?
Attachment #8603278 -
Flags: review?(shuang) → review+
| Assignee | ||
Comment 16•10 years ago
|
||
Hi
> ::: dom/bluetooth/bluedroid/BluetoothDaemonConnector.cpp
> @@ +7,5 @@
> > +
> > +#include "BluetoothDaemonConnector.h"
> > +#include <fcntl.h>
> > +#include "nsISupportsImpl.h" // For MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
> > +#include "nsThreadUtils.h" // For NS_IsMainThread.
I took this from some original connector, but I can remove these comments. 'nsThreadUtils.h' is removed by the final patch anyway.
> Perhaps we don't add comments for include.
>
> @@ +227,5 @@
> > +
> > +bool
> > +BluetoothDaemonConnector::SetUpListenSocket(int aFd)
> > +{
> > + return true;
>
> I'm not sure why we directly return true. Because it's "Deprecated"? If so,
> can you add some comments?
The deprecated code is completely removed by the final patch. I only copied these deprecated interfaces around to make the overall patch set easier to understand.
Comment 17•10 years ago
|
||
Sorry for being late. Will try to catch up tomorrow.
Comment 18•10 years ago
|
||
Comment on attachment 8603276 [details] [diff] [review]
[03] Bug 1161020: Implement new socket-connector interface for RIL
Review of attachment 8603276 [details] [diff] [review]:
-----------------------------------------------------------------
Thank you.
::: ipc/ril/Ril.cpp
@@ -270,5 @@
> - aAddrSize = strlen(aAddress) + offsetof(struct sockaddr_un, sun_path) + 1;
> - break;
> - case AF_INET:
> - aAddr.in.sin_family = af;
> - aAddr.in.sin_port = htons(RIL_TEST_PORT + mClientId);
As we are going to remove this line, please remove [1] accordingly, thank you.
[1] https://dxr.mozilla.org/mozilla-central/source/ipc/ril/Ril.cpp#37
Attachment #8603276 -
Flags: review?(htsai) → review+
| Assignee | ||
Comment 19•10 years ago
|
||
Changes since v1:
- removed unused constant
Attachment #8603276 -
Attachment is obsolete: true
Attachment #8606940 -
Flags: review+
| Assignee | ||
Comment 20•10 years ago
|
||
Changes since v1:
- rebased on latest m-c
- removed comments from include statements
The final patch removes the deprecated code.
Attachment #8603278 -
Attachment is obsolete: true
Attachment #8606943 -
Flags: review+
Comment 21•10 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/f90b8d3d6b70
https://hg.mozilla.org/integration/b2g-inbound/rev/13753f9043f7
https://hg.mozilla.org/integration/b2g-inbound/rev/34a20b05af6c
https://hg.mozilla.org/integration/b2g-inbound/rev/ac23206e80bd
https://hg.mozilla.org/integration/b2g-inbound/rev/a8f42d85ce3f
https://hg.mozilla.org/integration/b2g-inbound/rev/384de663084c
https://hg.mozilla.org/integration/b2g-inbound/rev/4f782be31f87
https://hg.mozilla.org/integration/b2g-inbound/rev/976e19eac8b5
| Assignee | ||
Comment 22•10 years ago
|
||
Comment 23•10 years ago
|
||
sorry had to back this out for memory leaks like https://treeherder.mozilla.org/logviewer.html#?job_id=1947450&repo=b2g-inbound
Flags: needinfo?(tzimmermann)
Comment 24•10 years ago
|
||
| Assignee | ||
Comment 25•10 years ago
|
||
I added some leak checking to Bluetooth. The problem might be somewhere else and the patch set only uncovered the leak.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=1c39e192dbdc
Flags: needinfo?(tzimmermann)
| Assignee | ||
Comment 26•10 years ago
|
||
Resolving some shutdown problems in Bluetooth:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=0d4965e2b760
| Assignee | ||
Comment 27•10 years ago
|
||
The leak happens even without the new patches, so it's an old problem. I opened bug 1166175 to investigate this further.
See Also: → 1166175
| Assignee | ||
Comment 28•10 years ago
|
||
| Assignee | ||
Comment 29•10 years ago
|
||
Changes since v1:
- removed leak checks, see bug 1166175
Attachment #8603272 -
Attachment is obsolete: true
Attachment #8607466 -
Flags: review+
| Assignee | ||
Comment 30•10 years ago
|
||
Changes since v1:
- removed leak checks, see bug 1166175
Attachment #8603273 -
Attachment is obsolete: true
Attachment #8607467 -
Flags: review+
| Assignee | ||
Comment 31•10 years ago
|
||
Changes since v2:
- removed leak checks, see bug 1166175
Attachment #8606940 -
Attachment is obsolete: true
Attachment #8607469 -
Flags: review+
| Assignee | ||
Comment 32•10 years ago
|
||
Changes since v1:
- removed leak checks, see bug 1166175
Attachment #8603277 -
Attachment is obsolete: true
Attachment #8607470 -
Flags: review+
| Assignee | ||
Comment 33•10 years ago
|
||
Changes since v2:
- removed leak checks, see bug 1166175
Attachment #8606943 -
Attachment is obsolete: true
Attachment #8607471 -
Flags: review+
| Assignee | ||
Comment 34•10 years ago
|
||
Changes since v1:
- removed leak checks, see bug 1166175
Attachment #8603279 -
Attachment is obsolete: true
Attachment #8607472 -
Flags: review+
| Assignee | ||
Comment 35•10 years ago
|
||
Changes since v1:
- rebased
Attachment #8603283 -
Attachment is obsolete: true
Attachment #8607473 -
Flags: review+
Comment 36•10 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/7e5b9e5c24ff
https://hg.mozilla.org/integration/b2g-inbound/rev/1acea1f3dfe5
https://hg.mozilla.org/integration/b2g-inbound/rev/0ba5a258797d
https://hg.mozilla.org/integration/b2g-inbound/rev/85939a63419f
https://hg.mozilla.org/integration/b2g-inbound/rev/b8c39f01f5f4
https://hg.mozilla.org/integration/b2g-inbound/rev/854336cbcbb9
https://hg.mozilla.org/integration/b2g-inbound/rev/6d5e774afa38
https://hg.mozilla.org/integration/b2g-inbound/rev/3529de81a668
| Assignee | ||
Comment 37•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7e5b9e5c24ff
https://hg.mozilla.org/mozilla-central/rev/1acea1f3dfe5
https://hg.mozilla.org/mozilla-central/rev/0ba5a258797d
https://hg.mozilla.org/mozilla-central/rev/85939a63419f
https://hg.mozilla.org/mozilla-central/rev/b8c39f01f5f4
https://hg.mozilla.org/mozilla-central/rev/854336cbcbb9
https://hg.mozilla.org/mozilla-central/rev/6d5e774afa38
https://hg.mozilla.org/mozilla-central/rev/3529de81a668
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S13 (29may)
You need to log in
before you can comment on or make changes to this bug.
Description
•