Closed Bug 1164417 Opened 10 years ago Closed 10 years ago

Cleanup |PrepareAccept| in socket I/O code

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

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)

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|.
Depends on: 1164425
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.
Attachment #8607560 - Flags: review?(kyle) → review+
Attachment #8607561 - Flags: review?(kyle) → review+
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+
> > > > + 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.
Changes since v1: - clarified comment about connector ownership - removed unnecessary semicolon
Attachment #8607562 - Attachment is obsolete: true
Attachment #8607972 - Flags: review+
Blocks: 1166638
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: