Closed
Bug 1164417
Opened 10 years ago
Closed 10 years ago
Cleanup |PrepareAccept| in socket I/O code
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
(3 files, 1 obsolete file)
|
8.38 KB,
patch
|
qdot
:
review+
|
Details | Diff | Splinter Review |
|
4.08 KB,
patch
|
qdot
:
review+
|
Details | Diff | Splinter Review |
|
14.81 KB,
patch
|
tzimmermann
:
review+
|
Details | Diff | Splinter Review |
With the changes of bug 1161020, the current code for accepting a socket connection can be simplified. The socket connector of the listen socket shall create a connector for the connection-oriented socket that handles the connection. No need to override |StreamSocket::PrepareAccept|.
| Assignee | ||
Comment 1•10 years ago
|
||
| Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8607560 -
Flags: review?(kyle)
| Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8607561 -
Flags: review?(kyle)
| Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8607562 -
Flags: review?(kyle)
| Assignee | ||
Comment 5•10 years ago
|
||
This patch set simplifies accepting a socket. In one of the next patch sets, it might become possible to remove the subclasses of |StreamSocket| altogether.
Updated•10 years ago
|
Attachment #8607560 -
Flags: review?(kyle) → review+
Updated•10 years ago
|
Attachment #8607561 -
Flags: review?(kyle) → review+
Comment 6•10 years ago
|
||
Comment on attachment 8607562 [details] [diff] [review]
[03] Bug 1164417: Add |ConnectionOrientedSocket::PrepareAccept| for accepting socket connections
Review of attachment 8607562 [details] [diff] [review]:
-----------------------------------------------------------------
r+ with nits addressed/questions answered.
::: ipc/bluetooth/BluetoothDaemonConnection.cpp
@@ +451,5 @@
> {
> MOZ_ASSERT(NS_IsMainThread());
> MOZ_ASSERT(!mIO);
>
> + nsAutoPtr<UnixSocketConnector> connector(aConnector); // We don't need this
Why is this still here if we don't need it?
@@ +463,2 @@
>
> + return NS_OK;;
nit: only one semicolon
Attachment #8607562 -
Flags: review?(kyle) → review+
| Assignee | ||
Comment 7•10 years ago
|
||
> >
> > + nsAutoPtr<UnixSocketConnector> connector(aConnector); // We don't need this
>
> Why is this still here if we don't need it?
Right, that comment is misleading. It means that the connector is part of the interface, but we currently don't actually need or use it. Since |BluetoothDaemonConnection| owns the pointer, it stores it in an |nsAutoPtr| so it gets deleted.
I'll update the comment to be precise.
| Assignee | ||
Comment 8•10 years ago
|
||
Changes since v1:
- clarified comment about connector ownership
- removed unnecessary semicolon
Attachment #8607562 -
Attachment is obsolete: true
Attachment #8607972 -
Flags: review+
| Assignee | ||
Comment 10•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0b9b45499f77
https://hg.mozilla.org/mozilla-central/rev/13411cc00f09
https://hg.mozilla.org/mozilla-central/rev/d68065786c99
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
•