Commit Graph

223 Commits

Author SHA1 Message Date
Ben Tian
71aac41a86 Bug 1127701 - Fix warning: NS_ENSURE_TRUE(value.isNumber()) failed, r=joliu 2015-07-29 16:40:39 +08:00
Thomas Zimmermann
ae3f007a39 Bug 1185478: Remove strong references from socket I/O class to socket classes
The shutdown procedure for socket classes ensures that the I/O class is
deleted independently from its socket class. If the socket class has been
deleted, no I/O is performed and no socket events are forwarded. The I/O
class therefore doesn't require a strong reference to its socket class.

This patch removes the remaining ref-counted pointers from the socket I/O
classes. The socket class clears the weak reference in its socket I/O class
when closing the socket.
2015-07-21 08:06:29 +02:00
Thomas Zimmermann
9e43771c76 Bug 1185478: Add leak checks to socket I/O classes 2015-07-21 08:06:29 +02:00
Birunthan Mohanathas
47ed3a3675 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Juan Gomez
01df2f691b Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Ryan VanderMeulen
e6131fc8b8 Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage. 2015-06-25 19:48:42 -04:00
Juan Gomez
2128198065 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-06-24 14:11:00 -04:00
Jocelyn Liu
cb94db24ac Bug 1167064 - Patch1: Switch to bluetooth APIv2. r=shuang 2015-06-16 09:38:50 +08:00
Shawn Huang
08e6a8dfbe Backed out changesets 0832ffdd8144 for Bug 1167064 2015-06-15 19:05:03 +08:00
Jocelyn Liu
571fe4aad6 Bug 1167064 - Patch1: Switch to bluetooth APIv2. r=shuang 2015-06-15 17:11:35 +08:00
Thomas Zimmermann
c44f1139e2 Bug 1172479: Replace |nsIThread| by |MessageLoop| in socket I/O code, r=kmachulis
Dispatching events via |nsIThread| doesn't work with worker threads. This
patch replaces all uses of |nsIThread| in the socket code by equivalent
uses of |MessageLoop|.
2015-06-09 09:50:10 +02:00
Ryan VanderMeulen
fe34b60cf4 Backed out changeset 150544a28405 (bug 1167064) for B2G mochitest failures. 2015-06-08 15:41:26 -04:00
Jocelyn Liu
2165ebe1d8 Bug 1167064 - Switch to bluetooth APIv2. r=shuang 2015-06-04 02:59:00 -04:00
Thomas Zimmermann
21a30b633f Bug 1168806: Use 'consumer thread' in socket interface, r=kmachulis
The socket IPC interfaces still use 'main thread' in a number of
places. This patch changes all such interfaces and documentation
to speak of 'consumer thread' instead.
2015-06-02 10:01:58 +02:00
Thomas Zimmermann
364b0a0542 Bug 1168806: Configurable consumer thread for socket IPC classes, r=kmachulis
The consumer thread handles socket creation, destruction, and
data processing for socket IPC. Traditionally this has been
done on the main thread.

This patch extends the socket IPC classes to support arbitrary
consumer threads. The thread is configured when establishing a
connection, and performs all of the above operations until the
socket is closed.
2015-06-02 10:01:57 +02:00
Thomas Zimmermann
425da7831c Bug 1168806: Configurable I/O thread for socket IPC classes, r=kmachulis
The I/O thread sends and receives data on a file descriptor. This
has traditionally been performed on a single I/O thread.

This patch extends the socket IPC classes to support arbitrary I/O
threads. The thread is configured when a connection is established
and used until the socket gets closed.
2015-06-02 10:01:57 +02:00
Thomas Zimmermann
0ff93d975f Bug 1168446: Don't store connection parameters in |BluetoothSocket|, r=shuang 2015-06-01 10:42:29 +02:00
Thomas Zimmermann
0d1b4b5d58 Bug 1168446: Change |BluetoothSocket::{ListenSocket,ConnectSocket}| interface, r=shuang
This patch changes |BluetoothSocket::{ListenSocket,ConnectSocket}| to
be similar to the corresponding interfaces in ipc/unixsocket.
2015-06-01 10:42:29 +02:00
Thomas Zimmermann
a8a663fc4c Bug 1168446: Remove |BluetoothSocket::GetSocketAddr|, r=shuang 2015-06-01 10:42:29 +02:00
Thomas Zimmermann
9ec8c10366 Bug 1168446: Remove |Disconnect| from BlueZ's |BluetoothSocket|, r=shuang
The method |BluetoothSocket::Disconnect| is just a wrapper around
|Close|. This patch replaces all invocations of |Disconnect| with
|Close| and removes the method.
2015-06-01 10:42:29 +02:00
Thomas Zimmermann
92a42ffbe4 Bug 1167210: Replace |union sockaddr_any| with |struct sockaddr_storage|, r=kmachulis
Both types, |union sockaddr_any| and |struct sockaddr_storage|, provide
a sockaddr type that can hold any address. The latter is standardized by
POSIX, so we prefer it.
2015-05-27 13:49:07 +02:00
Thomas Zimmermann
a385885364 Bug 1164417: Add |UnixSocketConnector::Duplicate|, r=kmachulis
The new method |UnixSocketConnector::Duplicate| allows a socket
connector to duplicate itself. Listening sockets will used this
feature to create socket connectors for accepted connections.
2015-05-21 13:34:37 +02:00
Ben Tian
e738188cd8 Bug 1166587 - Check OBEX packet length before accessing it, r=shuang 2015-05-21 14:11:20 +08:00
Carsten "Tomcat" Book
a1b96b13aa merge mozilla-inbound to mozilla-central a=merge 2015-05-20 15:52:31 +02:00
Thomas Zimmermann
ca2120fb35 Bug 1164425: Rename |SocketBase::CloseSocket| to |SocketBase::Close|, r=kmachulis 2015-05-20 10:50:43 +02:00
Carsten "Tomcat" Book
24a87517b4 Backed out changeset 1e93024c9fec (bug 1164425) for bustage 2015-05-20 10:31:55 +02:00
Thomas Zimmermann
a0c499fc22 Bug 1164425: Rename |SocketBase::CloseSocket| to |SocketBase::Close|, r=kmachulis 2015-05-20 09:54:27 +02:00
Thomas Zimmermann
aedad80f8c Bug 1161020: Remove old interface and implementation from socket-connector classes, r=kmachulis 2015-05-19 13:28:46 +02:00
Thomas Zimmermann
fef18979cc Bug 1161020: Use new socket-connector interface in socket classes, r=kmachulis
This patch converts the socket I/O classes to use the new interface
of the socket-connector classes. All sockets are now created and set
up by a socket connector.
2015-05-19 13:28:46 +02:00
Thomas Zimmermann
97a394946e Bug 1161020: Implement new socket-connector interface for Bluetooth sockets, r=btian 2015-05-19 13:28:46 +02:00
Thomas Zimmermann
8ece57532a Bug 1164498: Remove |DispatchBluetoothReply|, r=btian
This patch removes |DispatchBluetoothReply|. The only remaining user
is |BluetoothDBusService|, but it comes with its own implemenation of
the function.
2015-05-19 12:28:38 +02:00
Thomas Zimmermann
2e4712ef31 Bug 1164498: Remove |DispatchBluetoothReply| from |BluetoothHfpManger|, r=btian
This patch replaces |DispatchBluetoothReply| in |BluetoothHfpManager|
with corresponding calls to |DispatchReplySuccess| or |DispatchReplyError|.
2015-05-19 12:28:38 +02:00
Andrea Marchesini
d92f2c8a0a Bug 1163388 - patch 1 - make nsIDOMFile an empty interface, r=ehsan 2015-05-18 14:51:54 +01:00
Wes Kocher
3bc88f0b61 Merge m-c to inbound, a=merge 2015-05-19 16:44:10 -07:00
Andrea Marchesini
49653d3acc Bug 1166231 - patch 2 - BluetoothOppManager blob uses fixed CLOSED TREE 2015-05-19 17:08:47 +01:00
Ben Tian
07e3a20b12 Bug 1159179 - Patch 1/3: [PBAP] Add OBEX related functions, r=shuang 2015-05-07 17:07:58 +08:00
Andrea Marchesini
615fe38d14 Bug 1163387 - Rename FileImpl to BlobImpl, r=ehsan 2015-05-12 13:11:03 +01:00
Andrea Marchesini
08c931dc57 Bug 1159401 - Split Blob and File classes, r=bz 2015-05-12 13:09:51 +01:00
Wes Kocher
ad02ab5ada Backed out changeset 56e4c68dc3da (bug 1163387) for build bustage CLOSED TREE 2015-05-11 13:17:58 -07:00
Andrea Marchesini
4aa3305857 Bug 1163387 - Rename FileImpl to BlobImpl, r=ehsan 2015-05-11 18:50:54 +01:00
Thomas Zimmermann
01405a19a7 Bug 1162585: Set socket flags after socket has been created, r=kmachulis
This patch moves the code for setting socket flags in the socket I/O
classes to the few locations were sockets are created. Any other socket
setup is redundant and has been removed.
2015-05-08 09:45:42 +02:00
Thomas Zimmermann
11aef2cf1c Bug 1162524: Move |accept| out of |UnixSocketWatcher|, r=kmachulis
Calls to |accept| are now handled by the corresponding socket I/O
class. This makes the code more flexible. All callers have been
adapted.
2015-05-08 09:43:01 +02:00
Thomas Zimmermann
bf325d916b Bug 1159267: Share BlueZ's HFP manager between Bluetooth v1 and v2, r=btian
Both implementations mostly differ in coding style and correctness
fixes. The last remaining differences are related to different
interfaces in Bluetooth v1 and v2.
2015-05-06 09:58:04 +02:00
Carsten "Tomcat" Book
cc3a50cf79 Merge mozilla-central to b2g-inbound 2015-05-04 15:26:45 +02:00
Jamin Liu
a721ed32bd Bug 1063444 - Implement LE scan related methods and LE device event. r=joliu, r=mrbkap 2015-05-04 18:59:02 +08:00
Andrew McCreight
c979f253c0 Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Thomas Zimmermann
f0efefb121 Bug 1159709: Cleanup inherited methods of BlueZ's |BluetoothSocket|, r=kmachulis
This patch cleans up the inherited methods of BlueZ's |BluetooothSocket|.
Methods of the same base class are grouped within the file, and each
method is labeled with 'override'.
2015-04-30 12:55:37 +02:00
Thomas Zimmermann
9d654e96e7 Bug 1159209: Remove template parameters from |DataSocketIO|, r=kmachulis
This patch removes the template parameters from |DataSocketIO| and
moves its methods into the C++ source file. All users have been
adapted.
2015-04-29 11:19:28 +02:00
Thomas Zimmermann
97a6e261a2 Bug 1159209: Remove template parameters from |SocketIOShutdownTask|, r=kmachulis
This patch removes the template parameters from |SocketIOShutdownTask|
and moves its methods into the C++ source file. All users have been
adapted.
2015-04-29 11:19:28 +02:00
Thomas Zimmermann
108688d07a Bug 1159209: Remove template parameters from |SocketIORequestClosingRunnable|, r=kmachulis
This patch removes the template parameters from
|SocketIORequestClosingRunnable| and moves its methods into
the C++ source file. All users have been adapted.
2015-04-29 11:19:28 +02:00