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

88 Коммитов

Автор SHA1 Сообщение Дата
Thomas Zimmermann 42c137c01d Bug 1268432: Replace |Task| with |Runnable| in B2G code r=fabrice
This patch converts the remaining B2G code from |Task| to |Runnable| and
fixes related API calls. This is a follow-up to bug 1266595.
2016-05-02 10:27:15 -07:00
Gregor Wagner acecad8f82 Bug 1267577 - Move nsRunnable to mozilla::Runnable. r=gsvelto 2016-04-27 12:05:40 +02:00
Thomas Zimmermann c08b1e935a Bug 1252841: Convert Bluetooth module to |UniquePtr<>|, r=btian 2016-03-22 11:26:45 +01:00
Tom Tung 8d0ccf2497 Bug 1253217 - Change filename from BluetoothUuid to BluetoothUuidHelper. r=jocelyn
--HG--
rename : dom/bluetooth/common/BluetoothUuid.cpp => dom/bluetooth/common/BluetoothUuidHelper.cpp
rename : dom/bluetooth/common/BluetoothUuid.h => dom/bluetooth/common/BluetoothUuidHelper.h
2016-03-09 10:57:35 +08:00
Thomas Zimmermann d8cb801b6f Bug 1251541: Replace |nsAutoArrayPtr<>| with |UniquePtr<[]>| in Bluetooth managers, r=shuang 2016-02-29 12:15:08 +01:00
Thomas Zimmermann a88bdd194f Bug 1239979: Close sockets when deinitializing Bluetooth profile managers, r=btian 2016-01-21 12:30:00 +01:00
Thomas Zimmermann 3db34e3133 Bug 1239979: Uninitialized Bluetooth profile managers explictly to release refs, r=shuang
The current Bluetooth profile managers remove themselves from a number
of observer lists in their destructors. But |nsIObserverService| keeps
it's own reference to the managers, so the destructors never run. Con-
sequently the Bluetooth module nevers cleans up correctly.

This patch adds an explicit uninit method to each profile manager. It
removes the manager from the observer lists.
2016-01-21 12:30:00 +01:00
Thomas Zimmermann 0163bc2474 Bug 1239979: Init and uninit all Bluetooth profile managers, r=shuang
The use is init and deinit methods is currently inconsistent among
Bluetooth profile managers. This patch unifies all these methods and
integrates them into the Bluetooth service. Instances of the manager
classes are now unref'ed during Bluetooth shutdown.
2016-01-21 12:30:00 +01:00
Thomas Zimmermann e0a6a77e8f Bug 1238991: Don't connect Bluetooth OPP manager before service channel is known, r=btian
The Bluetooth Opp manager requires the service channel of the remote
service to connect successfully. If the service channel isn't known,
it sends an SDP update request to get the value from the remote device.

The current code will still try to connect with an invalid service
channel. This patch fixes the issue by returning early after sending
the SDP update request.
2016-01-14 14:55:49 +01:00
Nathan Froyd 3dfc3842bc Bug 1236561 - part 1 - convert easy cases of nsAutoArrayPtr<T> to UniquePtr<T[]> in dom/bluetooth/; r=btian 2015-12-06 10:23:59 -05:00
Thomas Zimmermann 30f1560836 Bug 1223722: Transfer Bluetooth addresses in |BluetoothValue|, r=brsun 2016-01-05 12:01:33 +01:00
Ben Tian 2b918d0fd2 Bug 1228471 - use Endian.h to write filename and handleId into OBEX packet, r=shuang 2015-12-01 10:36:43 +08:00
Nathan Froyd 0bb0df5675 Bug 1221547 - part 2 - copy less data for file transfers over bluetooth; r=btian
We have a number of places where we create a Bluetooth request with
allocated memory, then copy that memory into the raw data to be sent
over the socket.  We can do better by transferring ownership to the
socket data, rather than copying.
2015-11-02 16:16:38 -05:00
Nathan Froyd 555ffcc8b5 Bug 1221326 - use Endian.h more widely in bluetooth code; r=btian 2015-11-02 15:13:10 -05:00
Thomas Zimmermann cb9c58250a Bug 1215525: Replace strings with Bluetooth addresses and UUIDs in Bluetooth mid-layer, r=brsun 2015-10-30 14:54:41 +01:00
Thomas Zimmermann da8fa8c983 Bug 1215525: Update |BluetoothUuid| structure with c'tors and helper methods, r=brsun 2015-10-30 14:54:41 +01:00
Carsten "Tomcat" Book e8397e7416 Backed out changeset 078dd0e39cc8 (bug 1215525) for bustage 2015-10-29 14:37:47 +01:00
Carsten "Tomcat" Book aa4d7353fb Backed out changeset 4a99cfd718aa (bug 1215525) 2015-10-29 14:37:34 +01:00
Thomas Zimmermann dc14c6ccee Bug 1215525: Replace strings with Bluetooth addresses and UUIDs in Bluetooth mid-layer, r=brsun 2015-10-29 13:30:02 +01:00
Thomas Zimmermann e88ddf0797 Bug 1215525: Update |BluetoothUuid| structure with c'tors and helper methods, r=brsun 2015-10-29 13:30:01 +01:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd 583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Thomas Zimmermann 8dc1fa85d9 Bug 1141616: Lookup service channel in Bluedroid's OPP manager, r=btian
Bluedroid's |BluetoothOppManager| now retrieves the OBEX service's
channel from the remote device. Previously this was done by the
Bluedroid driver internally, but having this functionality in the
manager itself will allow for future code sharing with the BlueZ
backend.
2015-09-09 13:20:57 +02:00
Ben Tian 5e46603952 Bug 1195685 - Transform macro |BT_APPEND_NAMED_VALUE| into function, r=shuang 2015-09-09 10:59:36 +08:00
Ben Tian 6576fbda41 Bug 1191715 - Store local pointer of thread to shutdwon to avoid reentry crash, f=jesup, r=shuang 2015-09-08 11:15:49 +08:00
Ben Tian 9c177c52d4 Bug 1055434 - Do not inform gaia of current blob's sending failure before assigning it, r=shuang 2015-08-18 17:31:41 +08:00
Thomas Zimmermann be105911a1 Bug 1168446: Don't store connection parameters in |BluetoothSocket|, r=shuang 2015-06-01 10:42:29 +02:00
Ben Tian ea0745da15 Bug 1166587 - Check OBEX packet length before accessing it, r=shuang 2015-05-21 14:11:20 +08:00
Carsten "Tomcat" Book 12f69af823 merge mozilla-inbound to mozilla-central a=merge 2015-05-20 15:52:31 +02:00
Thomas Zimmermann 1237cad18c Bug 1164425: Rename |SocketBase::CloseSocket| to |SocketBase::Close|, r=kmachulis 2015-05-20 10:50:43 +02:00
Carsten "Tomcat" Book 1aa07d706a Backed out changeset 1e93024c9fec (bug 1164425) for bustage 2015-05-20 10:31:55 +02:00
Thomas Zimmermann 533d048a4b Bug 1164425: Rename |SocketBase::CloseSocket| to |SocketBase::Close|, r=kmachulis 2015-05-20 09:54:27 +02:00
Ben Tian 8aa4af6efd Bug 1166176 - [cleanup] Simplify volume related code in OPP manager, r=shuang 2015-05-19 17:09:56 +08:00
Andrea Marchesini 3aa189b5ff Bug 1163388 - patch 2 - get rid of nsIDOMFile, r=ehsan
--HG--
rename : dom/base/nsIDOMFile.idl => dom/base/nsIDOMBlob.idl
2015-05-18 14:52:26 +01:00
Andrea Marchesini 338c67e420 Bug 1163388 - patch 1 - make nsIDOMFile an empty interface, r=ehsan 2015-05-18 14:51:54 +01:00
Andrea Marchesini 61b9bd0496 Bug 1166231 - Make nsIDOMBlob an empty interface, r=ehsan 2015-05-19 15:36:37 +01:00
Ben Tian a482aeaa6d Bug 1159179 - Patch 1/3: [PBAP] Add OBEX related functions, r=shuang 2015-05-07 17:07:58 +08:00
Andrea Marchesini f4538bb921 Bug 1163387 - Rename FileImpl to BlobImpl, r=ehsan
--HG--
rename : dom/base/MultipartFileImpl.cpp => dom/base/MultipartBlobImpl.cpp
rename : dom/base/MultipartFileImpl.h => dom/base/MultipartBlobImpl.h
2015-05-12 13:11:03 +01:00
Andrea Marchesini 368a198972 Bug 1159401 - Split Blob and File classes, r=bz 2015-05-12 13:09:51 +01:00
Wes Kocher 983fcabeef Backed out 2 changesets (bug 1159401) for b2g build bustage
Backed out changeset adfee1efb1e1 (bug 1159401)
Backed out changeset 70c63c8546e3 (bug 1159401)
2015-05-11 14:54:02 -07:00
Wes Kocher 6b003ab737 Backed out changeset 56e4c68dc3da (bug 1163387) for build bustage CLOSED TREE
--HG--
rename : dom/base/MultipartBlobImpl.cpp => dom/base/MultipartFileImpl.cpp
rename : dom/base/MultipartBlobImpl.h => dom/base/MultipartFileImpl.h
2015-05-11 13:17:58 -07:00
Andrea Marchesini 49a0ee6938 Bug 1163387 - Rename FileImpl to BlobImpl, r=ehsan
--HG--
rename : dom/base/MultipartFileImpl.cpp => dom/base/MultipartBlobImpl.cpp
rename : dom/base/MultipartFileImpl.h => dom/base/MultipartBlobImpl.h
2015-05-11 18:50:54 +01:00
Andrea Marchesini 40a62edb0c Bug 1159401 - patch 2 - Avoid multiple inheritance of nsIDOMBlob, r=bz 2015-05-11 18:50:52 +01:00
Thomas Zimmermann e608040aea Bug 1159267: Share Bluedroid's OPP manager between Bluetooth v1 and v2, r=btian
Bluedroid's OPP manager is the same for Bluetooth v1 and v2; except
for bug 1118177, which is fixed in v1. So with this patch, the v1
implementation is used for both variants.
2015-05-06 09:58:04 +02:00
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Ben Tian 5c10976f50 Bug 1158081 - Patch (2/2): Simplify |BluetoothOppManager::SendObexData| function, r=tzimmermann 2015-04-28 11:12:35 +08:00
Thomas Zimmermann bbd18cd078 Bug 1156352: Remove |UnixSocketRawData| from Bluetooth interfaces, r=btian 2015-04-23 13:48:47 +02:00
Ben Tian 7895eb1e99 Bug 1152694 - Make UUID and service name as input arguments for BluetoothSocket, r=tzimmermann 2015-04-13 17:30:47 +08:00
Thomas Zimmermann dde2e9fbf1 Bug 1146355: Prepare Bluetooth OPP manager, r=joliu 2015-04-09 15:57:41 +02:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00