Commit Graph

228 Commits

Author SHA1 Message Date
Thomas Zimmermann
9f3537f1e7 Bug 1084342: Copy received ancillary data into |SocketMessageWatcher|, r=shawnjohnjr
The cast-and-assign pattern for retrieving file descriptors is prone to
SIGBUS signals on platforms that don't support unaligned memory access.
This patch fixes the problem by copying the received data directly.
2014-10-28 10:34:29 +01:00
Thomas Zimmermann
1dc3c01e56 Bug 1084342: Fix receive buffer size in |SocketMessageWatcher|, r=shawnjohnjr
|SocketMessageWatcher| currently allocates a large amount of memory
for holding ancillary data. The only actually transfered value is a
file descriptor. This patch fixes the buffer size accordingly.
2014-10-28 10:34:18 +01:00
Thomas Zimmermann
9645691f14 Bug 1084342: Move |SocketMessageWatcher| to separate file, r=shawnjohnjr
This patch moves |SocketMessageWatcher| into a separate file. The new
Bluetooth daemon will require it's functionality for OPP profiles.
2014-10-28 10:34:09 +01:00
Edgar Chen
167bcf3e30 Bug 1083843 - [MobileConnection] Deprecate CFStateChangeEvent.success. r=hsinyi,smaug,btian 2014-10-23 22:13:35 +08:00
Jamin Liu
2b891c7e6f Bug 1069868 - Set Bluetooth property |discoverable| to |false| after Bluetooth enabled. r=shuang
Bluetooth scan mode is BT_SCAN_MODE_CONNECTABLE by default, it means it
should be connectable and non-discoverable.
2014-10-21 01:27:00 -04:00
Thomas Zimmermann
368c9b8be6 Bug 1083092: Data parameter for |mozilla::ipc::SocketIOSendTask| template, r=shawnjohnjr
The data class in |SocketIOSendTask| is now a template parameter, instead
of being hard-coded to |UnixSocketRawData|. The patch also adds soem minor
cleanups to the file.
2014-10-21 10:52:12 +02:00
Thomas Zimmermann
8136d65793 Bug 1083092: Introduce |mozilla::ipc::SocketBase|, r=shawnjohnjr
The new class |SocketBase| contains the notification mechanism of
|SocketConsumerBase|. The latter still contains I/O methods.
2014-10-21 10:52:11 +02:00
Jessica Jong
5fa33ace0d Bug 1052842 - Part 4: Use enums for NetworkSelectionMode in nsIMobileConnectionService.idl (bt). r=btian 2014-10-21 14:31:48 +08:00
Thomas Zimmermann
3a8da53d02 Bug 1074419: Close received socket file descriptors on errors, r=shawnjohnjr 2014-10-01 10:50:33 +02:00
Jocelyn Liu
6e06db1251 Bug 1083646: Overwrite BLE config in bluedroid to enable BLE for bluetooth2. r=shuang 2014-10-17 14:25:16 +08:00
Thomas Zimmermann
7b70c83aca Bug 1083708: Handle non-existant Bluetooth profile interfaces correctly, r=shawnjohnjr
Bluetooth profile managers just return an error if a profile interface is
not available. Doing so breaks the initialization and cleanup routines. This
patch changes the profile managers to still report an error, but signal
progress to the given result runnable.
2014-10-16 16:40:49 +02:00
Ryan VanderMeulen
1444bbde76 Merge inbound to m-c. a=merge
CLOSED TREE
2014-10-15 14:31:16 -04:00
Thomas Zimmermann
d478ea1fbb Bug 1081981: Fix Out-of-bounds read when decoding BT properties, r=shawnjohnjr
Bluetooth's RSSI property is encoded as pointer to a signed 8-bit
value. Gecko currently interprets this as pointer to a 32-bit
value; so the result of dereferencing the pointer is undefined.

This patch fixes the bug by interpreting the RSSI property correctly.
2014-10-15 11:38:06 +02:00
Jocelyn Liu
9bcf445a00 Bug 1080463 - Patch3: [bluetooth2] Notify OPP manager when Bluetooth socket message error occurs(Bug 1052304). r=shuang 2014-10-15 17:49:08 +08:00
Jocelyn Liu
aaf628ca3e Bug 1080463 - Patch2: [bluetooth2] Use nsRefPtr to avoid ReplyRunnable being released during IPC process(Bug 1072802). r=shuang 2014-10-15 17:49:04 +08:00
Jocelyn Liu
264267ddea Bug 1080463 - Patch1: [bluetooth2] Porting DOMFile/DOMBlob to WebIDL(Bug 1047483). r=shuang 2014-10-15 17:49:00 +08:00
Ryan VanderMeulen
c614939b7a Merge inbound to m-c. a=merge 2014-10-07 16:00:48 -04:00
Thomas Zimmermann
e123efaefa Bug 1065999: Ignore unknown Bluetooth properties, r=shuang
This patch is a workaround for unknown Bluetooth properties. Instead of
failing completely, we simply ignore them.
2014-09-29 11:41:02 +02:00
Edgar Chen
5e5f03c964 Bug 994461 - Part 3: BT changes for IccInfo WebIDL. r=echou 2014-09-15 23:14:49 +08:00
Bobby Holley
f0a4bb61be Bug 1065185 - Stop using Promise.jsm over SpecialPowers in marionette tests. r=bz 2014-10-03 10:05:50 +02:00
Ben Tian
a14b1e8c36 Bug 1075331 - [bluetooth2] Fix build break resulting from bug 994190, r=shuang 2014-10-01 14:04:07 +08:00
Ben Tian
b676478223 Bug 1074132 - [bluetooth2] Fix build break resulting from bug 1053966, r=shuang 2014-09-29 18:56:48 +08:00
Ben Turner
b5f643fa70 Bug 994190 - 'Modify main-thread IndexedDB to use PBackground', r=khuey. 2014-09-26 16:21:57 -07:00
Jocelyn Liu
2cd7dcf779 Bug 1054830 - Patch3: Add init/cleanup and notification handling functions into GattManager. r=tzimmermann 2014-09-26 11:16:40 +08:00
Jocelyn Liu
799920c60e Bug 1054830 - Patch2: Implement gatt main/client interface and notifications. r=tzimmermann 2014-09-26 11:16:36 +08:00
Jocelyn Liu
b2476edd33 Bug 1054830 - Patch1: Define structures to represent bluedroid's gatt data structures. r=tzimmermann 2014-09-26 11:16:32 +08:00
Ben Tian
1d423552ff Bug 1063066 - [Flame][KK] Bluetooth transfer does not work in Gallery App. r=tzimmermann 2014-09-25 18:35:54 +08:00
Mike Habicher
dda4a3a8c0 Bug 1053966 - move mozsettings-changed Observer info from aSubject to aData, r=bz,qDot 2014-09-16 13:15:16 -04:00
Thomas Zimmermann
8074617ee6 Bug 1065897: Distribute Bluetooth HAL implementation among multiple files (unter bluetooth2/), r=btian
The files BluetoothHALInterface.{cpp,h} are getting too large. This patch
moves helper functions and profile implementations into separate files.
2014-09-23 09:41:57 +08:00
Thomas Zimmermann
c5c045a29c Bug 1065897: Move Bluedroid code out of BluetoothInterface.{cpp,h} (under bluetooth2/), r=btian
This patch moves BluetoothInterface.{cpp,h} to the generic section
of Gecko's Bluetooth code, and the Bluedroid implementation into
the new files BluetoothHalImplementation.{cpp,h}.

BluetoothHalImplementation.{cpp,h} contains all Bluedroid-specific
code. The classes in BluetoothInterface.{cpp,h} are now interfaces
for Gecko.

--HG--
rename : dom/bluetooth2/bluedroid/BluetoothInterface.cpp => dom/bluetooth2/bluedroid/BluetoothHALInterface.cpp
2014-09-23 09:40:36 +08:00
Kyle Machulis
13d0f1a981 Bug 1069115 - Make bluetooth webapi marionette tests wait for transaction success when changing settings; r=echou
--HG--
extra : rebase_source : c4fdc80f904987c848bca4b839d8b3f36fefd667
2014-09-22 16:15:07 -07:00
Vicamo Yang
7d4d4ffdb3 Bug 1063304 - 3.c/3: accommodate other components. r=echen 2014-09-21 15:24:43 +08:00
Ben Turner
68190e91be Backout bug 994190 and merge over some stuff that landed afterwards on a CLOSED TREE. 2014-09-17 19:36:01 -04:00
Peter Van der Beken
4b7e268d87 Bug 1078744 - Replace SetIsDOMBinding with SetIsNonDOMBinding, remove nsWrapperCache::SetIsDOMBinding. r=bz.
--HG--
extra : rebase_source : 89c476cd9436530b2df5acc903909e34188417a0
2014-10-07 11:44:49 +02:00
Peter Van der Beken
b8e952c4b7 Bug 1078744 - Replace SetIsDOMBinding with SetIsNonDOMBinding, remove some IsDOMBinding asserts. r=bz.
--HG--
extra : rebase_source : 74569bd08dbc0d6755ac45999cfe99725ef6bc0a
2014-10-07 11:44:49 +02:00
Carsten "Tomcat" Book
04587e0c5b Backed out changeset 9ff2889f236a (bug 1063304) 2014-09-17 13:13:08 +02:00
Ryan VanderMeulen
234d711b8c Backed out changeset ed586ca080c0 (bug 1053966) for the same Mnw permafails it was backed out for previously. 2014-09-16 16:54:25 -04:00
Mike Habicher
04a56fc028 Bug 1053966 - move mozsettings-changed Observer info from aSubject to aData, r=bz,qDot 2014-09-16 13:15:16 -04:00
Vicamo Yang
cc05806a50 Bug 1063304 - 3.c/3: accommodate other components. r=echen 2014-09-16 21:20:18 +08:00
Ben Turner
c6ede83e24 Bug 994190 - 'Modify main-thread IndexedDB to use PBackground', r=khuey.
--HG--
rename : dom/indexedDB/ipc/SerializationHelpers.h => dom/indexedDB/SerializationHelpers.h
rename : dom/indexedDB/ipc/unit/head.js => dom/indexedDB/test/unit/xpcshell-head-child-process.js
rename : dom/indexedDB/test/unit/head.js => dom/indexedDB/test/unit/xpcshell-head-parent-process.js
rename : dom/ipc/Blob.h => dom/ipc/BlobParent.h
rename : dom/ipc/FileDescriptorSetChild.cpp => ipc/glue/FileDescriptorSetChild.cpp
rename : dom/ipc/FileDescriptorSetChild.h => ipc/glue/FileDescriptorSetChild.h
rename : dom/ipc/FileDescriptorSetParent.cpp => ipc/glue/FileDescriptorSetParent.cpp
rename : dom/ipc/FileDescriptorSetParent.h => ipc/glue/FileDescriptorSetParent.h
rename : dom/ipc/PFileDescriptorSet.ipdl => ipc/glue/PFileDescriptorSet.ipdl
2014-09-13 12:12:19 -04:00
Ben Tian
629ae7c730 Bug 1061481 - Patch 3/3: Implementation of BluetoothDevice.type attribute, f=tzimmermann, r=echou 2014-09-11 10:04:18 +08:00
Ryan VanderMeulen
9b21225b74 Backed out changeset 661f503ea524 (bug 1053966) for Mnw perma-fail. 2014-09-10 12:36:12 -04:00
Mike Habicher
3413e5b08b Bug 1053966 - pass settings change notices to Observers as aSubject instead of aData, r=bz,qdot 2014-08-25 18:06:31 -04:00
Thomas Zimmermann
8e87cccd85 Bug 1064264: Remove references to Android from BluetoothServiceBluedroid, r=btian 2014-09-09 16:30:06 +02:00
Thomas Zimmermann
87e8d8c047 Bug 1064264: Cleanup ANDROID_VERSION from BluetoothA2DPManager (under bluetooth2/), r=btian
All interfaces for Bluetooth profiles are now always available, so we
don't have to check for specific versions of Bluedroid. Instead, we
try to call the methods, and check their results.
2014-09-09 16:30:06 +02:00
Thomas Zimmermann
3cb581e846 Bug 1064264: Make Bluetooth AVRCP interface generally available (under bluetooth2/), r=btian
The methods of |BluetoothAVRCPInterface| are now always available. On
Android versions before 18, which don't support AVRCP, they always
fail with STATUS_UNSUPPORTED.
2014-09-09 16:30:06 +02:00
Thomas Zimmermann
845e61f99e Bug 1064264: Fix constants in Bluedroid HFP manager (under bluetooth2/), r=btian
This patch replaces the remaining Bluedroid constants from Bluedroid's
|BluetoothHfpManager| with Gecko constants.
2014-09-09 16:30:05 +02:00
Thomas Zimmermann
a9ed320628 Bug 1064264: Add AVRCP_UID_SIZE to Bluetooth (under bluetooth2/), r=btian
The constant AVRCP_UID_SIZE replaces the corresponding Bluedroid
constant BTRC_UID_SIZE.
2014-09-09 16:30:05 +02:00
Thomas Zimmermann
bc211f689d Bug 1059813: Use getter/setter methods of |UnixSocketRawData| in Bluetooth, r=btian 2014-09-08 11:44:02 +02:00
Thomas Zimmermann
3781429b8d Bug 1062754: Support peer shutdown and EOF in |SocketIOBase|, r=qdot, btian
Calling read on a socket that has been closed for reading by the
peer, read returns 0. The socket is still readable however, so
polling and reading will return constant results of 0 received
bytes.

With this patch, if a socket's peer shuts down reading or if
we reached the EOF, we stop watching the file descriptor for
readability. |SocketIOBase| will detect this case exactly once
and initiate the socket's shutdown.
2014-09-05 10:16:24 +02:00