Граф коммитов

211 Коммитов

Автор SHA1 Сообщение Дата
Carsten "Tomcat" Book 4906608cdb Backed out changeset be0077054b48 (bug 1046109) 2014-07-31 10:14:27 +02:00
Carsten "Tomcat" Book c09a652709 Backed out changeset 0bf18526200b (bug 1046109) 2014-07-31 10:14:26 +02:00
Carsten "Tomcat" Book 1aed5ff89c Backed out changeset 9ef0211ae121 (bug 1046109) 2014-07-31 10:14:24 +02:00
Carsten "Tomcat" Book ce5d8cbd2d Backed out changeset 5314248e45b5 (bug 1046109) 2014-07-31 10:14:23 +02:00
Carsten "Tomcat" Book a50c27d1bd Backed out changeset b20b097fde99 (bug 1046109) 2014-07-31 10:14:21 +02:00
Carsten "Tomcat" Book 2cf95b537d Backed out changeset 452a777db125 (bug 1046109) 2014-07-31 10:14:18 +02:00
Thomas Zimmermann 33e4f2a298 Bug 1046109: Cleanup |UnixSocketImpl|, r=kyle
This patch cleans up |UnixSocketImpl| and it's file in general. The
patch

 - renames |UnixSocketImpl| to |UnixSocketConsumerIO|,
 - moves method definitions out of class definition,
 - adds const correctness,
 - adds MOZ_FINAL to several classes, and
 - moves task classes to a separate location.

No functional changes are performed.
2014-07-31 09:29:20 +02:00
Thomas Zimmermann a9b4333ac2 Bug 1046109: Add |SocketIOShutdownTask|, r=kyle
|SocketIOShutdownTask| invokes the shutdown procedure for Socket I/O
objects on the I/O thread.
2014-07-31 09:29:20 +02:00
Thomas Zimmermann c432a85ebf Bug 1046109: Add |SocketIOSendTask|, r=kyle
|SocketIOSendTask| moves data from the main thread to the Socket I/O
class on the I/O thread, and invokes the Socket I/O classes sending
methods.
2014-07-31 09:29:20 +02:00
Thomas Zimmermann 6a1b24606f Bug 1046109: Add |SocketIOTask|, r=kyle
|SocketIOTask| is a task-class template that holds a reference to
a Socket I/O object. It replaces |UnixSocketImplTask|, which only
supports objects of type |UnixSocketImpl|.
2014-07-31 09:29:20 +02:00
Thomas Zimmermann af11427c1d Bug 1046109: Add |SocketIOBase|, r=kyle
|SocketIOBase| is a base class for Socket I/O classes. It's not a
requirement, but provides a number of helpful methods for common
I/O operations on the I/O thread.
2014-07-31 09:29:19 +02:00
Thomas Zimmermann f24375cd4f Bug 1046109: Add |SocketIODeleteInstanceRunnable|, r=kyle
|SocketIODeleteInstanceRunnable| deletes a Socket I/O object on the
main thread. This is required to serialize the close operation of
Socket consumers.
2014-07-31 09:29:19 +02:00
Thomas Zimmermann 83a32d0363 Bug 1046109: Add |SocketIORequestClosingRunnable|, r=kyle
|SocketIORequestClosingRunnable| notifies the Socket consumer on
the main thread to clean up the Socket I/O object and close the
connection.
2014-07-31 09:29:19 +02:00
Thomas Zimmermann d655c9346a Bug 1046109: Add |SocketIOReceiveRunnable|, r=kyle
|SocketIOReceiveRunnable| sends received data from the Socket I/O
object on the I/O thread to the Socket consumer on the main thread.
2014-07-31 09:29:18 +02:00
Thomas Zimmermann bccdf65eee Bug 1046109: Add |SocketIOEventRunnable|, r=kyle
|SocketIOEventRunnable| sends a notification from the Socket I/O
object to a Socket consumer on the main thread.
2014-07-31 09:29:18 +02:00
Thomas Zimmermann 4771b4409c Bug 1046109: Add |SocketIORunnable|, r=kyle
|SocketIORunnable| is a runnable class template that holds a
reference to a arbitrary Socket I/O object.  |SocketIORunnable|
replaces |UnixSocketImplRunnable|, which only handles objects of
type |UnixSocketImpl|.
2014-07-31 09:29:18 +02:00
Thomas Zimmermann ac4e122590 Bug 1046109: Add |SocketConsumerBase| and inherit |UnixSocketConsumer| from it, r=kyle
|SocketConsumerBase| handles connection state for |UnixSocketConsumer|
and its derived classes. Implementing classes must override a number of
virtual methods, to handle notifications about changes to the state of
the connection.
2014-07-31 09:29:17 +02:00
Shelly Lin 9c64583a64 Bug 908995 - Part 3: Add source events for TaskTracer. r=khuey,smaug. 2014-04-23 15:32:31 +08:00
Kyle Huey 2c8f15bb95 Bug 991812: Remove uses of AtomicRefCounted<T> that live in Gecko. r=ehsan
--HG--
extra : rebase_source : 0d14e02c64d548fd3177681248d722683aaa87c3
2014-04-14 12:04:25 -07:00
Ryan VanderMeulen d3859c597c Backed out changesets ddbac34527fe and fa82f32d0c39 (bug 991812) for B2G bustage.
CLOSED TREE
2014-04-14 16:16:18 -04:00
Kyle Huey 74215b6cbb Bug 991812: Remove uses of AtomicRefCounted<T> that live in Gecko. r=ehsan 2014-04-14 12:04:25 -07:00
Thomas Zimmermann b1a0dca697 Bug 990984: Explicitly close socket file descriptor, r=kyle
Closing the socket explicitly will make UnixSocket fail
if we're trying to read or write afterwards; indicating
potential bugs.
2014-04-08 09:30:58 +02:00
Thomas Zimmermann f6123e2f13 Bug 981239: Use atomic ref-counting for |UnixSocketConsumer|, r=kyle
|SocketSendTask| acquires a reference to |UnixSocketConsumer| on
the main thread and releases this reference on the I/O thread;
leading to race-conditions. This patch adds

  - atomicity for ref-counting of |UnixSocketConsumer|, and
  - stricter tests in the destructor of this class.
2014-04-08 09:27:47 +02:00
Ben Tian dcfe02f1f2 Bug 979668 - [Bluetooth] Sender name is not shown in transfer requests, f=tzimmermann, r=kyle 2014-03-10 10:11:27 +08:00
Thomas Zimmermann 1cd3637686 Bug 977672: Cleanup includes and defines in UnixSocket.cpp, r=kyle
The patch removes unnecessary includes and define statements from
UnixSocket.cpp.
2014-02-28 10:16:53 +01:00
Thomas Zimmermann cbd14014a8 Bug 977672: Cleanup runnables and tasks in UnixSocket.cpp, r=kyle
This patch cleans up runnables and tasks in UnixSocket.cpp. Every
runnable's name now ends in Runnable. There are a base classes for
runnables and tasks that hold reference to UnixSocketImpl and from
which all runnables and tasks inherit.
2014-02-28 10:16:53 +01:00
Thomas Zimmermann b1f27db3bd Bug 977672: Assert O_NONBLOCK for watched file descriptors, r=kyle
We cannot use blocking file-descriptor I/O on the I/O thread. This
patch adds an assertion to UnixFdWatcher the tests for the O_NONBLOCK
flag, when installing a file descriptor. In UnixFileWatcher, the
Open method tests for the O_NONBLOCK flag for the opened file.

File-descriptor flags for UnixSocketImpl et al are currently set by
UnixSocketImpl itself. Later patches should move this into the
methods of connector classes.
2014-02-28 10:16:52 +01:00
Thomas Zimmermann c654d7918c Bug 974410: Cleanup UnixSocketImpl, r=kyle
This patch cleans up the implementation of UnixSocketImpl by

 - inlining all calls to SetUpIO,
 - removing the unsued constant SOCKET_RETRY_TIME_MS, and
 - separating logging from Bluetooth.
2014-02-26 17:52:18 +01:00
Thomas Zimmermann b7ca389378 Bug 974410: Inherit UnixSocketImpl from UnixSocketWatcher, r=kyle
The base class UnixSocketWatcher handles the connection state of
the socket. UnixSocketImpl overrides UnixSocketWatcher's callback
methods for implementing it's functionality.
2014-02-26 17:52:09 +01:00
Thomas Zimmermann 86166bbfe7 Bug 974410: Inherit UnixSocketImpl from UnixFdWatcher, r=kyle
With this patch UnixSocketImpl inherits from UnixFdWatcher. The
new base class implements general file-descriptor handling and
I/O watchers.
2014-02-26 17:52:00 +01:00
Ehsan Akhgari 7e41f47adf Bug 935778 - Part 0.4: Spray even more MOZ_DECLARE_REFCOUNTED_TYPENAME across the tree 2014-02-21 09:11:33 -05:00
Thomas Zimmermann df970eb457 Bug 972265: Maintain connect delay in UnixSocketConsumer, r=kyle
UnixSocketConsumer now maintains a delay for re-establishing closed
connection. The initial delay is zero, so that the first connect call
is processed immediately. At the first failed attempt to connect, the
delay is set to ~1 second, and is increased by a factor of 2 on each
successive error until it reaches ~1 minute.

The UnixSocketConsumer code resets the delay to zero if it is lower
than the time that the connection was open. This heuristics protects
against cases where the peer establishes a connection, and closes it
shortly afterwards. Incompatible versions of rild show this behavior.
2014-02-14 08:03:05 +01:00
Kyle Machulis 2a7c93d911 Bug 843857 - Make sure all socket errors fire events back to, r=tdz 2013-12-09 16:46:20 -08:00
Ryan VanderMeulen 6f82db3ea7 Backed out changeset f3c055585a4f (bug 843857) for B2G mochitest bustage. 2014-01-24 17:19:52 -05:00
Kyle Machulis 07eebca28f Bug 843857: Fix connection error handling in UnixSocket; r=tzimmermann 2014-01-24 12:06:40 -08:00
Ehsan Akhgari ae6b29e6ac Bug 951207 - Rename the chromium LOG macro to CHROMIUM_LOG; r=bent 2013-12-17 13:26:45 -05:00
Ryan VanderMeulen 52ab5ad2dc Merge b2g-inbound to m-c. 2013-12-09 17:26:11 -05:00
Birunthan Mohanathas 68b00083fd Bug 713082 - Part 1: Remove unnecessary Util.h includes. r=Waldo 2013-12-08 21:52:33 -05:00
Thomas Zimmermann 2a3d1cd8b9 Bug 936402: Duplicate connection status in UnixSocketImpl, r=bent
UnixSocketImpl, which mostly runs on the I/O thread, doesn't control
its reference to UnixSocketConsumer. If the connection status is
stored in UnixSocketConsumer, the I/O thread can't read it safely.

This patch duplicates the connection status in UnixSocketImpl, where
reading from the I/O thread is safe. Methods of UnixSocketImpl don't
need to access mConsumer any longer to obtain the connection status.
2013-12-09 14:21:18 +01:00
Mike Hommey 2812d11fce Bug 939632 - Remove LIBRARY_NAME for leaf libraries. r=gps
Landing on a CLOSED TREE.
2013-11-19 11:50:54 +09:00
Mike Hommey e06d795c71 Bug 939074 - Remove most LIBXUL_LIBRARY. rs=gps 2013-11-19 11:48:10 +09:00
Mike Hommey e80e877ab7 Bug 939044 - Remove most definitions of MODULE. r=mshal 2013-11-19 11:47:39 +09:00
Mike Hommey ffe0380912 Bug 935881 - Use FINAL_LIBRARY for all (fake) libraries that end up linked in a single other library. r=gps 2013-11-19 11:47:14 +09:00
Chuck Lee f497343dae Bug 928223 - 0001. Add function to perform setup for listen socket. r=qDot echou vicamo yoshi 2013-10-25 10:00:22 +08:00
Mike Hommey b000a846c2 Bug 929905 - Consolidate sources in moz.build. r=gps 2013-10-25 08:23:05 +09:00
Brian O'Keefe 9c9d71fddb Bug 928709 - Convert chromium-config.mk to mozbuild, r=mshal 2013-10-02 13:17:55 -04:00
Shawn Huang 6fdf08afa3 Bug 880610: Part2-Add build flag in UnixSocket to distinguish between bluez and bluedroid stack, r=echou 2013-10-23 14:12:24 +08:00
Eric Chou 71f1f5760b Backed out changeset 089f015f15bb and e907ab075ec8 (bug 880610) for hitting MOZ_ASSERT 2013-10-19 16:01:25 +08:00
Shawn Huang cae6b0cfa1 Bug 880610: Part2-Add build flag in UnixSocket to distinguish between bluez and bluedroid stack. r=echou 2013-10-17 18:25:55 +08:00
Ms2ger f4153f40d4 Bug 900980 - Part a: Move unconditional assignments to EXPORT_LIBRARY to moz.build; rs=gps 2013-10-03 09:11:13 +02:00
Thomas Zimmermann e641d4540e Bug 912996: Remove memcpy when reading from Unix socket, r=qdot
We used to allocate memory on the stack when reading from a file
descriptor and copied the result into an instance of UnixSocketRawData.

This patch

 - cleans up the interface of UnixSocketRawData,
 - removes the large stack allocation (64KiB), and
 - removes the unnecessary memcpy.

Other memcpys for sending data have been moved into the constructor
of UnixSocketRawData.

--HG--
extra : rebase_source : 46ed1c73481732c3f3350bf0bedb56d376c24e98
2013-09-06 10:18:35 +02:00
Thomas Zimmermann 6ab06611af Bug 912996: Fix whitespaces, r=qdot
--HG--
extra : rebase_source : 1494c72c57e9e47dd7e082ef39bc264d348b6224
2013-09-06 10:17:55 +02:00
Mike Hommey f8bc7fa754 Bug 912293 - Remove now redundant boilerplate from Makefile.in. r=gps 2013-09-05 09:01:46 +09:00
Brian O'Keefe d118b95a0d Bug 875934 - Move LIBRARY_NAME to moz.build, batch 3; r=mshal 2013-08-15 09:02:09 -04:00
Eric Chou 1e2631f053 Bug 902460 - Close socket before NotifyError(), r=qdot 2013-08-27 12:10:48 +08:00
Ms2ger 1c4d224f0e Bug 883284 - Part d: Move LIBXUL_LIBRARY into moz.build (f-j); r=bsmedberg 2013-08-22 08:56:00 +02:00
Ms2ger 4807f1c86c Bug 882859 - Part b: Move FAIL_ON_WARNINGS into moz.build; r=joey+gps 2013-08-22 08:55:59 +02:00
Brian O'Keefe 61565e4086 Bug 896177 - Remove useless config.mk includes; r=gps 2013-07-17 16:06:53 -04:00
Ms2ger ee0442e9f6 Bug 899261 - Use @DEPTH@ more; r=bsmedberg 2013-08-02 09:04:38 +02:00
Brian O'Keefe f4815f2203 Bug 883502 - Part 1: Move 'chromium_config.mk' includes after rules.mk. r=gps 2013-07-04 08:28:43 -04:00
Trevor Saunders f33ade0d68 bug 887483 - remove a bunch of useless assignments to FORCE_STATIC_LIB implied by LIBXUL_LIBRARY=1 r=mshal 2013-07-11 11:06:34 -04:00
Justin Lebar 051c5b560a Bug 802686 - s/MOZ_NOT_REACHED/MOZ_CRASH/ in Gecko. r=(see below)
r=tbsaunde for accessible
r=jmuizelaar for gfx
r=roc for layout
r=glandium for mozglue
r=jduell for netwerk
r=khuey for everything else

This is a mechanical change made with sed.  Later patches in this queue
clean up the whitespace errors and so on.
2013-06-28 18:38:30 -07:00
Mike Shal 5169c0a913 Bug 864774 - Part 2: Move CPPSRCS to moz.build as CPP_SOURCES; r=joey CLOSED TREE
From 9e0ba7f425143f545eb6c4b26a9a96b5ade4d8e9 Mon Sep 17 00:00:00 2001
2013-04-23 17:54:15 -04:00
Kyle Machulis 8b159fc25b Bug 854846: Make UnixSocket's connect function non-block; r=tzimmermann 2013-05-13 20:51:21 -07:00
Mike Shal df7deac25b Bug 846634 - Part 2: Move EXPORTS to moz.build; r=joey 2013-04-16 15:24:43 -04:00
Eric Chou 85ab9277fa Bug 823803 - Add L2CAP/EL2CAP Socket support, r=qdot, r=gyeh
This version of BlueZ from Code Aurora has added GOEP_PSM to Object
Push Profile service record, which means that remote devices may
connect with us via both L2CAP and RFCOMM. This patch completes
L2CAP/EL2CAP socket implementation.
2013-04-12 18:45:37 +08:00
Eric Chou 9a7967cfef Bug 851046: Patch 2 - New Class: BluetoothSocket; r=mrbkap 2013-04-04 17:52:12 -07:00
Matt Brubeck 3ee37d2232 Back out bug 851046 because of rebase problems 2013-04-04 17:45:06 -07:00
Eric Chou 1cb12255d7 Bug 851046: Patch 2 - New Class: BluetoothSocket; r=mrbkap
--HG--
extra : rebase_source : 692fc69bc24a212621a5ff8a37fd17c237de9b20
2013-04-04 17:25:44 -07:00
Ryan VanderMeulen e3283fe2b4 Backed out 9 changesets (bug 851046) for B2G bustage on a CLOSED TREE. 2013-04-03 15:54:36 -04:00
Eric Chou 25528343e6 Bug 851046 - New class: BluetoothSocket. r=mrbkap
After this new class is landed, communicating with other devices on
profile level should become more intuitive and reasonable. Each
Bluetooth*Manager doesn't need to inherit UnixSocketConsumer, instead,
BluetoothSocket inherits UnixSocketConsumer. That makes Bluetooth*Manager
be able to have more than 1 Bluetooth connections at a time with different
remote devices.
2013-02-26 11:16:36 +08:00
Kyle Machulis d7f9476df4 Bug 855453 - Move UnixSocket connect delay to main thread cancelable task; r=mrbkap
--HG--
extra : rebase_source : 1df9805896c85f0a97d42b74334a62b7b9baab68
2013-04-01 17:26:25 -07:00
Kyle Machulis 72a717a860 Bug 855465 - Add emacs python mode comments to moz.build files; r=gps 2013-04-01 11:36:59 -07:00
Kyle Machulis 43628a7867 Backout for changeset 03452b187c14 (Bug 855465) due to bustage on a CLOSED TREE; r=qdot 2013-03-29 15:12:58 -07:00
Kyle Machulis 334c0800cf Bug 855465 - Add emacs python mode comments to moz.build files; r=gps
--HG--
extra : rebase_source : 004a756492323e1a049586e85b3be5037159df20
2013-03-29 13:56:18 -07:00
Vicamo Yang 06c70a5f97 Bug 854904: fix undefined sockaddr_in, sockaddr_in6. r=qDot 2013-03-27 20:53:24 +08:00
Mike Shal 7ecea60097 Bug 844654 - Part 2: Move MODULE to moz.build; rs=gps 2013-03-19 11:47:00 -07:00
Kyle Machulis 474fc0a81e Bug 843868: Change sockaddr* to be a union of all possible sockaddr types; r=tzimmermann
--HG--
extra : rebase_source : 455aeb8c49bec2477a5ffea839a0ac3fe09434f7
2013-03-19 10:23:47 -07:00
Eric Chou 211f1afa9e Bug 851563 - Fix memory leak in UnixSocketConsumer, r=qdot 2013-03-17 23:39:08 -07:00
Phil Ringnalda 23bacd7773 Back out b21345c5027c (bug 843868) for build bustage
CLOSED TREE
2013-03-15 21:35:25 -07:00
Kyle Machulis dec533c10a Bug 843868 - Change sockaddr* to be a union of all possible sockaddr types; r=tzimmermann
--HG--
extra : rebase_source : 9b980684b37e2e3345414af494ddb22e6c710e52
2013-03-15 21:10:40 -07:00
Kyle Machulis 7eef9798c9 Bug 849078 - Change SetNonblockFlags to SetSocketFlags; r=echou
--HG--
extra : rebase_source : 495444e95cb6fef3cdae4606879b2f2fba812c24
2013-03-08 14:40:26 -08:00
Blake Kaplan 4124568811 Bug 846615 - Remove some functionality that is no longer needed, r=bent 2013-03-08 15:03:03 +08:00
Blake Kaplan 1d9c597586 Bug 846615 - Re-implement UnixSocket's shutdown sequence to avoid running any code on deleted UnixSocketImpls, r=bent 2013-03-08 15:03:03 +08:00
Eric Chou 0d7af4211e Bug 841648 - Clear mIOLoop when the UnixSocketImpl instance changes its target file descriptor, f=tzimmerman, r=qdot 2013-03-02 12:11:01 +08:00
Gregory Szorc c7bf7887f9 Bug 784841 - Part 18r: Convert /ipc; r=ted f=Ms2ger 2013-02-25 12:47:22 -08:00
Kyle Machulis 2fc57b1b3a Bug 840294: Check RIL validity before writing to socket; r=tzimmerman
--HG--
extra : rebase_source : 3fd48cad8cd3b06994972f420752c5676b2e68dc
2013-02-21 15:21:34 -08:00
Eric Chou 316cd7cb91 Bug 842434 - Ensure the flows of handling "socket disconnection" are the same, r=qdot
For "actively calling CloseSocket()" and "passively noticing the socket has been closed",
we want to ensure that the process of closing a socket are the same. Therefore I use a
runnable to call CloseSocket() on the main thread when it can't read from the socket.
2013-02-21 23:32:17 +08:00
Thomas Zimmermann 48d8b6a89f Bug 836523 - Cleanup UnixSocketImpl from within I/O thread. r=qdot, r=echou
When closing a socket from within the main thread, we need to make
sure that the I/O thread does not operate on the related instance of
UnixSocketImpl.

With this patch, the main thread posts a SocketCloseTask to the I/O
thread. The SocketCloseTask removes the socket from the I/O thread's
list of watched file descriptors and dispatches an instance of
DeleteInstanceRunnable for the socket's UnixSocketImpl, which cleans
up the data structures. These steps serialize the close operation
within the I/O thread, and ensure that the main thread processed all
other dispatched runnables that may use the UnixSocketImpl.
2013-02-12 09:16:45 -05:00
Thomas Zimmermann 3f0ed71307 Bug 836523 - Wait for incoming connections in UnixSocketImpl. r=qdot, r=echou
The UnixSocketImpl currently polls the socket file descriptor while
listening for incoming connections and schedules itself to run again
if no connection requests have been received.

This behavior interferes with closing the socket and deleting the
socket structure in the main thread. It can happen that the I/O thread
dispatches a SocketAcceptTask to poll the listening socket and the
main thread dispatches a DeleteInstanceRunnable for the UnixSocketImpl,
such that the delete operation gets dispatched before the poll
operation. The latter then operates on the just deleted UnixSocketImpl.

With this patch, the I/O thread watches the listing socket for incoming
connection requests and only attempts to run accept when connection
requests are pending. This allows to serialize polling and close
operations within the I/O thread in a sound order.

A side effect of this patch is that we don't constantly run code for
polling the listing socket, which should result in less CPU overhead
and save battery power.
2013-02-12 09:16:45 -05:00
Thomas Zimmermann 41c3e00ba0 Bug 836523 - Protect mCurrentTaskIsCanceled by lock. r=qdot, r=echou
The main thread and the I/O thread concurrently access the field
mCurrentTaskIsCanceled in UnixSocketImpl. Protect it by a lock.
2013-02-12 09:16:45 -05:00
Daniel Holbert 313b559876 Bug 838840: Mark ipc/unixsocket as FAIL_ON_WARNINGS. r=qDot 2013-02-06 16:39:36 -08:00
Daniel Holbert 6ca33d6109 Bug 838756: Fix out-of-order init list for UnixSocketImpl constructor. r=qDot 2013-02-06 12:44:04 -08:00
Vicamo Yang bab7d11b10 Bug 826931 - Part 2/3: UnixSocket - allow delayed connection. r=qDot 2013-02-01 20:28:18 +08:00
Vicamo Yang 3bf0d2e152 Bug 826931 - Part 1/3: UnixSocket - allow ownership take-over in ReceiveSocketData(). r=qDot,echou 2013-02-01 20:28:15 +08:00
Eric Chou 016d8b06f6 Bug 836107 - Initialize mTask, a member variable of UnixSocketImpl, with nullptr, r=qdot 2013-01-31 22:43:45 +08:00
Benoit Jacob 23cb9e5f40 Bug 835920 - UnixSocket and Ril mis-interpret read() returning 0 as failure and enter infinite reconnect loop - r=kyle.machulis 2013-01-30 15:13:10 -05:00
Thomas Zimmermann 91e69fce4d Bug 830704: Delete UnixSocketImpl instance after SocketReceiveTasks completed [r=qdot]
The Bluetooth system internally uses UnixSocketImpl when transfering
files. When Bluetooth gets disabled during a file transfer, the IPC code
deletes any related instance of UnixSocketImpl. This can happen before all
pending SocketReceiveTasks have been processed by the main thread. The
implementation of SocketReceiveTask uses a reference to the instance of
UnixSocketImpl that has just deen disabled. This results in a segmantation
fault.

This patch fixes the problem by scheduling the delete operation for
UnixSocketImpl to be executed after any pending SocketReceiveTasks.
2013-01-16 10:21:49 +08:00
Kyle Machulis e6a69d942f Bug 811683 - Changed UnixSocketRawData to take variable sizes up to 64k, r=cjones 2012-12-20 18:36:55 +08:00
Gina Yeh bc0b8dce42 Bug 804436 - Patch 1 : Add listening status to UnixSocket, r=gyeh 2012-10-26 17:28:34 +08:00
Kyle Machulis 0d5aa7e492 Bug 800249 - Patch 2: Add ability to retreive connected socket address as a string; r=cjones 2012-10-17 17:11:05 -07:00
Kyle Machulis f7cbae787d Bug 800249 - Patch 1: Add ability to store/retrieve address to UnixSocket; r=cjones 2012-10-17 17:10:27 -07:00
Kyle Machulis 79986a727c Bug 800247: Add disconnect events to UnixSocket, update Bluetooth*Manager; r=echou r=cjones
--HG--
extra : rebase_source : 809d46954baea51bf4053c3a48ce45b18b1a58e9
2012-10-12 11:38:14 -07:00
Kyle Machulis f9915e04e4 Bug 796176 - Patch 1: UnixSocket changes to get connect/listen running main thread, connect status to consumers; r=cjones
--HG--
extra : rebase_source : 7fa0ed00a2c4ad526412af4ae0081818a547e5f3
2012-10-10 22:48:40 -07:00
Kyle Machulis 2a5ddd38ed Bug 796184 - Revert UnixSocketImpl to a bare pointer, make Bluetooth*Managers use CloseSocket; r=cjones r=gyeh
--HG--
extra : rebase_source : fe8f4633eb9fb86ffc4a87e6b483b3357ab9896d
2012-10-05 16:05:35 -07:00
Kyle Machulis 184cc8ba2c Bug 790739: Patch 1 - UnixSocket changes for server sockets; r=cjones 2012-10-01 00:03:16 -07:00
Kyle Machulis a24393b718 Backing out e8e7e0cf43d8 (Bug 790739) due to bustage
--HG--
extra : rebase_source : ab39dff4819b2a08bbc9696bfdca88b513fcb9c6
2012-09-30 23:17:46 -07:00
Kyle Machulis f73578f1a8 Bug 790739: Patch 1 - UnixSocket changes for server sockets; r=cjones 2012-09-30 22:54:27 -07:00
Kyle Machulis f87fb81b3d Bug 776182: Patch 3 - Socket I/O for ipc unix sockets; r=cjones r=echou
--HG--
rename : ipc/socket/Makefile.in => ipc/unixsocket/Makefile.in
rename : ipc/socket/Socket.cpp => ipc/unixsocket/UnixSocket.cpp
rename : ipc/socket/Socket.h => ipc/unixsocket/UnixSocket.h
extra : rebase_source : 18f401b047424a187863c9fbe8943364330d1f4d
2012-09-25 13:13:15 -07:00
Kyle Machulis 979e723b46 Bug 776182: Patch 2 - Move Socket.* to UnixSocket.*; r=cjones
--HG--
rename : ipc/socket/Socket.cpp => ipc/unixsocket/UnixSocket.cpp
rename : ipc/socket/Socket.h => ipc/unixsocket/UnixSocket.h
extra : rebase_source : 1e8da79be97c0e6f1a457276b209ff3b4d1193f6
2012-09-25 12:32:09 -07:00
Kyle Machulis ef52cf02cc Bug 776182: Patch 1 - Move ipc/socket to ipc/unixsocket; r=cjones
--HG--
rename : ipc/socket/Makefile.in => ipc/unixsocket/Makefile.in
rename : ipc/socket/Socket.cpp => ipc/unixsocket/Socket.cpp
rename : ipc/socket/Socket.h => ipc/unixsocket/Socket.h
extra : rebase_source : ee6560813e80b834390a973c68147c2fc79e2aed
2012-09-25 12:31:22 -07:00