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

1831 Коммитов

Автор SHA1 Сообщение Дата
Alexandre Lissy e458f6fbc5 Bug 1301010 - Add missing Unused.h, StorageManager.h r=fabrice
MozReview-Commit-ID: 3ehLQTtBChb
2016-09-07 18:52:58 +02:00
Nicholas Nethercote 34dcc7b852 Bug 1299384 - Use MOZ_MUST_USE with NS_warn_if_impl(). r=erahm.
This change avoids lots of false positives for Coverity's CHECKED_RETURN
warning, caused by NS_WARN_IF's current use in both statement-style and
expression-style.

In the case where the code within the NS_WARN_IF has side-effects, I made the
following change.

> NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));
> -->
> Unused << NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));

In the case where the code within the NS_WARN_IF lacks side-effects, I made the
following change.

> NS_WARN_IF(!condWithoutSideEffects);
> -->
> NS_WARNING_ASSERTION(condWithoutSideEffects, "msg");

This has two improvements.
- The condition is not evaluated in non-debug builds.
- The sense of the condition is inverted to the familiar "this condition should
  be true" sense used in assertions.

A common variation on the side-effect-free case is the following.

> nsresult rv = Fn();
> NS_WARN_IF_(NS_FAILED(rv));
> -->
> DebugOnly<nsresult rv> = Fn();
> NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Fn failed");

--HG--
extra : rebase_source : 58788245021096efa8372a9dc1d597a611d45611
2016-09-02 17:12:24 +10:00
Nicholas Nethercote b71747b2ac Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.

--HG--
extra : rebase_source : 886e57a9e433e0cb6ed635cc075b34b7ebf81853
2016-09-01 15:01:16 +10:00
Kan-Ru Chen b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Nicholas Nethercote a54e0fd248 Bug 1295053 (part 9) - Don't use NS_METHOD for dom/ functions. r=froydnj.
These don't need __stdcall on Win32.

--HG--
extra : rebase_source : 93aa569789dab107137c5493d1c86acc6701329b
2016-08-16 12:12:30 +10:00
Alexandre Lissy 54158acc9a Bug 1294463 - Followup 1292892, remove nsContentUtils::RootingCx() r=jandem
MozReview-Commit-ID: 8p8rDw8tG3l
2016-08-11 20:42:53 +02:00
Nicholas Nethercote 8f51d02c97 Bug 1293117 (part 5) - Change many NS_METHOD occurrences to NS_IMETHOD. r=froydnj.
This patch makes the following changes on many in-class methods.

- NS_METHOD F() override;      --> NS_IMETHOD F() override;
- NS_METHOD F() override {...} --> NS_IMETHOD F() override {...}
- NS_METHOD F() final;         --> NS_IMETHOD F() final;
- NS_METHOD F() final {...}    --> NS_IMETHOD F() final {...}

Using NS_IMETHOD is the preferred way of marking in-class virtual methods.
Although these transformations add an explicit |virtual|, they are safe --
there's an implicit |virtual| anyway because |override| and |final| only work
with virtual methods.

--HG--
extra : rebase_source : 3010fade82a170eab7f13d81bf61b02cd693f3cf
2016-08-08 10:54:50 +10:00
Kaku Kuo a6ed727230 Bug 1292091 - Part 2 - replace MaybeResolve(JS::UndefinedHandleValue) with MaybeResolveWithUndefined(); r=bz
MozReview-Commit-ID: KNbxVcCVqts

--HG--
extra : transplant_source : %1D%18%E5%C9o%F0%29%E7%E0%93%EEcR%C7B%3BeX%B3%87
2016-08-09 17:15:13 +08:00
Nicholas Nethercote e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Thomas Zimmermann a8ff73abe9 Bug 1280600: Cleanup Bluetooth config and build scripts, r=glandium
Bluetooth availability depends on available driver; not the base system's
version. This patch separates both. Following other modules, it also moves
search-path setup for BT header files into the affected moz.build scripts.

MozReview-Commit-ID: 2hzjcJVTaLY
2016-07-11 15:16:56 +02:00
Boris Zbarsky d208b0de7a Bug 1282150 part 3. Add a way to get the JSRuntime for the thread, and use it in various places for rooting. r=bholley 2016-07-07 20:08:26 -04:00
Alexandre Lissy 1d8ace6878 Bug 1282571 - Followup of 1281748 Remove BlobSet.h r=baku
MozReview-Commit-ID: 92TmpwWdVmU

--HG--
extra : rebase_source : fbdf4ba38fc9de283d7e328efd9671fe13426925
2016-06-27 23:22:10 +02:00
Chris Peterson 11ef78ae89 Bug 1275016 - Rename Endian.h to EndianUtils.h to avoid #include confusion with Android's endian.h stdlib header. r=froydnj
--HG--
rename : mfbt/Endian.h => mfbt/EndianUtils.h
2016-05-22 13:31:11 -07:00
Bill McCloskey 291c555f34 Bug 1262671 - void** -> PickleIterator (r=froydnj) 2016-05-27 09:57:38 -07:00
Gijs Kruitbosch 29525495be Bug 1272414 - rip out qemu/browser/b2g flags from marionette manifests, r=AutomatedTester
MozReview-Commit-ID: 9RjGgykh0pR

--HG--
extra : rebase_source : a5bc5e888cc24e05fb4b5843c3738aa5456aea80
2016-05-19 17:23:26 +01:00
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
Gregor Wagner 2c3b158272 Merge 2016-04-04 12:08:53 +02:00
James Cheng c43f377eb6 Bug 1249518 - Make DaemonSocketPDU able to send multiple file descriptors in single unit. r=tzimmermann 2016-03-30 14:58:13 +08:00
Thomas Zimmermann c08b1e935a Bug 1252841: Convert Bluetooth module to |UniquePtr<>|, r=btian 2016-03-22 11:26:45 +01:00
Thomas Zimmermann e4de812e2e Bug 1252841: Convert Bluetooth daemon interfaces to |UniquePtr<>|, r=brsun 2016-03-22 11:26:45 +01:00
Gregor Wagner 8c33ab6483 Merge m-c -> b-i
--HG--
rename : js/src/configure.in => js/src/old-configure.in
rename : configure.in => old-configure.in
2016-03-09 16:59:48 +01:00
Gregor Wagner 9802b158d2 Merge m-c -> b-i 2016-02-08 14:41:52 +01:00
Will Wang 097b612bcc Bug 1240997 - Enable 3 Bluetooth marionette tests on B2G emulator-kk, r=btian
1. [test_dom_BluetoothManager.js]
2. [test_dom_BluetoothAdapter_enable.js]
3. [test_dom_BluetoothAdapter_setters.js]
2016-01-28 14:24:00 +08:00
Shawn Huang 681333dced Backouted out changesets 281539:f7d3592dc0bd due to test cases failed 2016-01-27 15:50:41 +08:00
Will Wang ef708ff8ac Bug 1240997 - Enable 3 Bluetooth marionette tests on B2G emulator-kk, r=btian
1. [test_dom_BluetoothManager.js]
2. [test_dom_BluetoothAdapter_enable.js]
3. [test_dom_BluetoothAdapter_setters.js]
2016-01-26 18:22:35 +08:00
Jocelyn Liu 73e2cdcead Bug 1238825: Add "dom.bluetooth.webbluetooth.enabled" preference for WebBluetooth API development. r=btian, r=bz 2016-01-25 14:35:18 +08:00
Ben Tian 619f16d2b0 Bug 1241382 - Revise default value of BluetoothAdapter.address and BluetoothDevice.address to empty string, f=wiwang, r=shuang 2016-01-22 14:34:25 +08:00
Louis Chang c9dae63d07 Bug 1248836 - HID Features Implementation, r=jocelyn 2016-02-04 18:40:32 +08:00
Bruce Sun fb2d868a4e Bug 1250694: Use functions to return static const BluetoothAddress and BluetoothUuid; r=tzimmermann 2016-03-04 18:54:18 +08:00
Bruce Sun 0e6586272e Backed out changeset ef9e220beb2d (bug 1250694) 2016-03-04 18:54:26 +08:00
Bruce Sun 7f34ab2c75 Bug 1250694: Use functions to return static const BluetoothAddress and BluetoothUuid; r=tzimmermann 2016-03-03 17:28:23 +08:00
Carsten "Tomcat" Book b52ca99105 Merge mozilla-central to b2g-inbound
--HG--
rename : browser/components/migration/tests/unit/test_fx_fhr.js => browser/components/migration/tests/unit/test_fx_telemetry.js
extra : rebase_source : e274f592a1f49a14c57ea09dffa5c29e9c5ec2d1
2016-01-21 12:30:56 +01:00
Thomas Zimmermann 2805ccddb1 Bug 1239979: Get pointers to Bluetooth managers during each shutdown, r=shuang
|BluetoothServiceBluedroid::StopInternal| stores pointers to Bluetooth
managers in a static array. This is only filled on the first call, but
pointers change when re-enabling Bluetooth.

This patch changes the code to use a non-static array, so pointers to
Bluetooth managers are looked-up on each call to the method.
2016-01-21 12:30:00 +01:00
Thomas Zimmermann 2b40f0b741 Bug 1239979: Cleanup |BluetoothSocket|'s internals when connections close, r=btian
With this patch, |BluetoothSocket| cleans up its internal state
whenever a connection gets closed, either intentionally or from
an error. The socket can then be reused for a new connection.

If we try to destruct an open Bluetooth socket, we'd probably
leak the file descriptor or transition into an undefined state.
The destructor now asserts that the socket is closed.
2016-01-21 12:30:00 +01:00
Thomas Zimmermann fb93218ad4 Bug 1239979: Store pointer to Bluetooth socket interface in |BluetoothSocket|, r=btian
|BluetoothSocket| currently stores the pointer to the socket interface
in a global static location. This pointer can become invalid if the
Bluetooth module get's disabled. Enabling Bluetooth again and calling
the socket interface would execute on undefined state. The current
implementation of the Bluedroid backend keeps the interface pointers
valid, so this problem doesn't happen in practice. It's still a bug,
though.

This patch changes |BluetoothSocket| to store the socket-interface
pointer internally. So it will acquire a new pointer for each socket.
2016-01-21 12:30:00 +01:00
Thomas Zimmermann 857bbd0291 Bug 1239979: Add |BluetoothSocket::Accept| method, r=btian
The new method |Accept| of |BluetoothSocket| encapsulates the code
for accepting from a passive socket. Having this method will allow
for storing the socket interface in |BluetoothSocket| itself.
2016-01-21 12:30:00 +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
Chris Lord 525d63acc9 Bug 1241117 - Fix mAppUuid access before assign in BluetoothGatt::Connect. r=joliu 2016-01-20 14:37:02 +00:00
Boris Zbarsky 172598b4e2 Bug 1257335. Replace some AutoSafeJSContext uses with AutoJSAPI or AutoJSContext uses. r=bholley
In general, using an AutoJSAPI inited with an object is NOT the same as using
AutoSafeJSContext (or AutoJSAPI inited without an object) and then entering the
compartment of the object: the former will report exceptions to the global of
the object as it comes off the stack, while the latter will not.  This only
really matters if we have an object from a window or worker global and hence
might fire error events, or report internal stuff to the web console.

The changes to initing with an object made in this bug are OK for the following
reasons:

1) dom/base/Console.cpp: Always clears its exception before coming off the stack.
2) dom/base/nsDOMClassInfo.cpp: Inits with a non-web global.
3) dom/base/nsFrameMessageManager.cpp: Inits with a non-web global.
4) dom/media/MediaPermissionGonk.cpp: We probably want the caller to notice if
   anything here throws.
5) dom/xbl/nsXBLPrototypeBinding.cpp: Inits with a non-web global.
6) dom/xul/nsXULElement.cpp: Inits with a non-web global.
7) extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp: Inits with a non-web global.
8) ipc/testshell/XPCShellEnvironment.cpp: Inits with a non-web global.
2016-03-18 10:48:38 -04:00
Jocelyn Liu c6da2ff1c4 Bug 1228546 - Implement peripheral mode support for GATT API. r=brsun, r=mrbkap 2016-01-15 09:50:54 +08: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
Carsten "Tomcat" Book d833f9ba1a merge mozilla-inbound to mozilla-central a=merge 2016-01-13 11:57:15 +01:00
Carsten "Tomcat" Book 10ba3dad80 Merge mozilla-central to b2g-inbound 2016-01-12 11:58:12 +01:00
Carsten "Tomcat" Book c2a8d865ec merge mozilla-inbound to mozilla-central a=merge 2016-01-12 11:54:38 +01:00
Ben Tian eb36691d55 Bug 1234974 - Handle null GetOwner() in |BluetoothAdapter::IsBluetoothCertifiedApp|, r=shuang 2016-01-12 15:53:59 +08:00
Ben Tian 5e2ce42994 Bug 1229697 - Cancel bond when user inputs empty pincode for pairing, r=shuang 2016-01-11 16:47:20 +08:00