Commit Graph

94 Commits

Author SHA1 Message Date
Shelly Lin
d63debcb8f Bug 908995 - Part 3: Add source events for TaskTracer. r=khuey,smaug. 2014-04-23 15:32:31 +08:00
Kyle Huey
b6957123df 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
601b02224e Backed out changesets ddbac34527fe and fa82f32d0c39 (bug 991812) for B2G bustage.
CLOSED TREE
2014-04-14 16:16:18 -04:00
Kyle Huey
acd8c16b76 Bug 991812: Remove uses of AtomicRefCounted<T> that live in Gecko. r=ehsan 2014-04-14 12:04:25 -07:00
Thomas Zimmermann
cab5fcb4dd 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
88cf1c0e54 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
506a83d68c 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
b8da10ea47 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
aeb9f13274 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
a3e0c85af9 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
ceb3f29bcc 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
928bfd8605 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
aaab8a6062 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
f1e844fd62 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
6d2e9a37cb 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
bd80ec4f6f Bug 843857 - Make sure all socket errors fire events back to, r=tdz 2013-12-09 16:46:20 -08:00
Ryan VanderMeulen
6c0a308b3e Backed out changeset f3c055585a4f (bug 843857) for B2G mochitest bustage. 2014-01-24 17:19:52 -05:00
Kyle Machulis
ecf3912cec Bug 843857: Fix connection error handling in UnixSocket; r=tzimmermann 2014-01-24 12:06:40 -08:00
Ehsan Akhgari
124f372395 Bug 951207 - Rename the chromium LOG macro to CHROMIUM_LOG; r=bent 2013-12-17 13:26:45 -05:00
Ryan VanderMeulen
ca386608b9 Merge b2g-inbound to m-c. 2013-12-09 17:26:11 -05:00
Birunthan Mohanathas
2a97f4dc0d Bug 713082 - Part 1: Remove unnecessary Util.h includes. r=Waldo 2013-12-08 21:52:33 -05:00
Thomas Zimmermann
16f635c504 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
a65383e1e9 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
8ceb917350 Bug 939074 - Remove most LIBXUL_LIBRARY. rs=gps 2013-11-19 11:48:10 +09:00
Mike Hommey
bb6779efe3 Bug 939044 - Remove most definitions of MODULE. r=mshal 2013-11-19 11:47:39 +09:00
Mike Hommey
d7b6f95761 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
c81c6692fc 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
1d566f7586 Bug 929905 - Consolidate sources in moz.build. r=gps 2013-10-25 08:23:05 +09:00
Brian O'Keefe
4c98f61956 Bug 928709 - Convert chromium-config.mk to mozbuild, r=mshal 2013-10-02 13:17:55 -04:00
Shawn Huang
db3e2aadbe 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
78d847180e Backed out changeset 089f015f15bb and e907ab075ec8 (bug 880610) for hitting MOZ_ASSERT 2013-10-19 16:01:25 +08:00
Shawn Huang
2b492aa310 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
7ffcd856c2 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
c44d624ad1 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
ee48608b82 Bug 912996: Fix whitespaces, r=qdot
--HG--
extra : rebase_source : 1494c72c57e9e47dd7e082ef39bc264d348b6224
2013-09-06 10:17:55 +02:00
Mike Hommey
f1cf3b4238 Bug 912293 - Remove now redundant boilerplate from Makefile.in. r=gps 2013-09-05 09:01:46 +09:00
Brian O'Keefe
4f68eb9b02 Bug 875934 - Move LIBRARY_NAME to moz.build, batch 3; r=mshal 2013-08-15 09:02:09 -04:00
Eric Chou
e65c1c0f30 Bug 902460 - Close socket before NotifyError(), r=qdot 2013-08-27 12:10:48 +08:00
Ms2ger
dba42e4001 Bug 883284 - Part d: Move LIBXUL_LIBRARY into moz.build (f-j); r=bsmedberg 2013-08-22 08:56:00 +02:00
Ms2ger
4d968c40e1 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
3a92f0ae7c Bug 896177 - Remove useless config.mk includes; r=gps 2013-07-17 16:06:53 -04:00
Ms2ger
047e8751d6 Bug 899261 - Use @DEPTH@ more; r=bsmedberg 2013-08-02 09:04:38 +02:00
Brian O'Keefe
a2b1403eb0 Bug 883502 - Part 1: Move 'chromium_config.mk' includes after rules.mk. r=gps 2013-07-04 08:28:43 -04:00
Trevor Saunders
82e5558b37 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
75c400493b 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
994cfe0b6b 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
a4edef6b84 Bug 854846: Make UnixSocket's connect function non-block; r=tzimmermann 2013-05-13 20:51:21 -07:00
Mike Shal
77cdb6567d Bug 846634 - Part 2: Move EXPORTS to moz.build; r=joey 2013-04-16 15:24:43 -04:00
Eric Chou
6e7344ce22 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
701eb23509 Bug 851046: Patch 2 - New Class: BluetoothSocket; r=mrbkap 2013-04-04 17:52:12 -07:00