The MDSM is constructed and destroyed on the main thread, but runs most
everything else on the task queue. So we need to bend the rules a bit here
to conveniently connect its mirrors during construction.
Also fixes bug 1005154 -- since there's now a method for "end of report",
we might as well call it from ActorDestroy instead of Recv__delete__.
--HG--
extra : rebase_source : 89f467fbc553a1a3a4d9b144fff747fa3447f21b
Preliminary cleanup before the main patch. There's no reason for the
child to send the generation number back to the parent when the parent
already had it; the IPDL actor abstraction will ensure that the binding
between parent-side state and child-side state is maintained.
--HG--
extra : rebase_source : 42163bca488e4f63c14e4aee54f91a72a796f081
Without unregistering the bluetooth signal handler when a object unlinked, we
might end up exposing a deleted object to JS or accessing deleted objects while
receiving signals from parent process.
This patch unregister signal handlers in unlink for each Bluetooth* classes
which registers signal handlers. And also checks if the signal handler is not
unregistered before handling signals in content process.
|ReceiveSocketData| receives socket data on the main thread. This
is a specific detail of the current socket classes, which should not
be required by future implementations.
This patch moves the receive method and the corresponding runnable
into socket classes.
This patch moves management of received socket I/O buffers from
|DataSocketIO| into the I/O classes. Each I/O class is responsible
for (de-)allocating buffers, and consuming them once data has been
received.
All current I/O classes forward their buffers to the main thread,
but other operations are possible. For example, received data can
be parsed and processed directly in the I/O thread.
This patch renames |SocketConsumerBase| to |DataSocket|, and for the
I/O classes |SocketConsumerIO| to |DataSocketIO|. |DataSocketIO| also
contains send and receive functionality from |SocketBaseIO|.
|DataSocket| is a virtual base class that represents a socket that
transfers data, without a particular constraints to what the data
represents. |DataSocketIO| is the corresponding helper class on the
I/O thread.
The current name reads to me like a boolean variable, even though it's
actually a counter. Try to make that property more explicit at its uses
by renaming it to something more evocative of counter-ness.