Commit Graph

563 Commits

Author SHA1 Message Date
Gabriele Svelto
cae1430c21 Bug 1251179 - Ensure that the lock protecting the CPU sleep functionality is always valid r=dhylands 2016-02-27 14:34:51 +01:00
Trevor Saunders
01bd692f5f bug 1249738 - make sSystemTimezoneChangeObservers a function static r=dhylands 2016-02-26 11:11:11 -05:00
Trevor Saunders
07ddb71efe bug 1249738 - make sSystemClockChangeObservers a function static r=dhylands 2016-02-26 11:11:10 -05:00
Trevor Saunders
6a081240f6 bug 1249738 - make sWakeLockObservers a function static r=dhylands 2016-02-26 11:11:10 -05:00
Trevor Saunders
fcc029f7be bug 1249738 - make sScreenConfigurationObservers a function static r=dhylands 2016-02-26 11:11:10 -05:00
Trevor Saunders
be12d31ef4 bug 1249738 - make sNetworkObservers a function static r=dhylands 2016-02-26 11:11:10 -05:00
Trevor Saunders
4443c5fda6 bug 1249738 - make sBatteryObservers a function static r=dhylands 2016-02-26 11:11:09 -05:00
Mantaroh Yoshinaga
295f8d7317 Bug 1248339 - fix header sort order of hal. r=gsvelto 2016-02-15 07:33:00 +01:00
Thomas Zimmermann
bdca8c1075 Bug 1194721: Support Gonk sensors daemon, r=gsvelto
This patch adds th state machine for supporting the Gonk sensors
daemon in Gecko. The daemon gets started when the first sensor is
enabled. Sensors can be enabled and disabled at will. The daemon
will send events about detected sensors and sensor events. Gecko's
state machine receives themand forwards them as DOM events.

The old support for device sensors is still present for devices without
sensorsd. A future patch will remove this code.
2016-02-04 12:35:13 +01:00
Thomas Zimmermann
3fee8bcdf4 Bug 1194721: Add interface for Gonk sensors daemon, r=gsvelto
This patch adds the interface for the Gonk sensors daemon. There
are only two major interfaces: connect and disconnect. The sensors
daemon is started before connecting and stopped after a disconnect.

Connections are race-free: we first set up a listen socket and let
Gecko listen for connections. Then the daemon gets started with the
socket's address as parameter. When the daemon connects to the
socket, Gecko will continue the startup and signal success to the
caller.
2016-02-04 12:35:13 +01:00
Thomas Zimmermann
b35d1a74c1 Bug 1194721: Add poll interface and module for Gonk sensors, r=gsvelto
The sensor daemon's poll service reads events from the device's
sensors. This patch adds Gecko support for this service. Gecko
receives information about existing sensors and can subscribe to
sensor events. Events will be delivered for each enabled sensor.
2016-02-04 12:35:13 +01:00
Thomas Zimmermann
fa3a3b1b24 Bug 1194721: Add registry interface and module for Gonk sensors, r=gsvelto
A system daemon can contain several services. One of them is the registry
service that manages all other services. This patch adds support for this
service in the Gonk sensors daemon.
2016-02-04 12:35:13 +01:00
Thomas Zimmermann
dd1f002311 Bug 1194721: Add helpers for Gonk sensors daemon, r=gsvelto
This patch adds helpers for using the Gonk sensors daemon. The types
and functions allow for packing and unpacking messages of the daemon's
IPC protocol.
2016-02-04 12:35:13 +01:00
Carsten "Tomcat" Book
015290e684 Backed out changeset 2a7dbf51f1e8 (bug 1194721) 2016-02-03 16:24:26 +01:00
Carsten "Tomcat" Book
bbf73780b4 Backed out changeset f817794c422b (bug 1194721) 2016-02-03 16:24:25 +01:00
Carsten "Tomcat" Book
e510ba930d Backed out changeset 6a5db0961a0a (bug 1194721) 2016-02-03 16:24:23 +01:00
Carsten "Tomcat" Book
1bdbdd58ec Backed out changeset 15a9b3c68084 (bug 1194721) 2016-02-03 16:24:22 +01:00
Carsten "Tomcat" Book
55d6875b07 Backed out changeset 8adcb4e83cf4 (bug 1194721) 2016-02-03 16:24:20 +01:00
Thomas Zimmermann
3dac25b504 Bug 1194721: Support Gonk sensors daemon, r=gsvelto
This patch adds th state machine for supporting the Gonk sensors
daemon in Gecko. The daemon gets started when the first sensor is
enabled. Sensors can be enabled and disabled at will. The daemon
will send events about detected sensors and sensor events. Gecko's
state machine receives themand forwards them as DOM events.

The old support for device sensors is still present for devices without
sensorsd. A future patch will remove this code.
2016-02-03 15:16:00 +01:00
Thomas Zimmermann
bb802cedf0 Bug 1194721: Add interface for Gonk sensors daemon, r=gsvelto
This patch adds the interface for the Gonk sensors daemon. There
are only two major interfaces: connect and disconnect. The sensors
daemon is started before connecting and stopped after a disconnect.

Connections are race-free: we first set up a listen socket and let
Gecko listen for connections. Then the daemon gets started with the
socket's address as parameter. When the daemon connects to the
socket, Gecko will continue the startup and signal success to the
caller.
2016-02-03 15:16:00 +01:00
Thomas Zimmermann
b89bc893d6 Bug 1194721: Add poll interface and module for Gonk sensors, r=gsvelto
The sensor daemon's poll service reads events from the device's
sensors. This patch adds Gecko support for this service. Gecko
receives information about existing sensors and can subscribe to
sensor events. Events will be delivered for each enabled sensor.
2016-02-03 15:16:00 +01:00
Thomas Zimmermann
e9dc67bab4 Bug 1194721: Add registry interface and module for Gonk sensors, r=gsvelto
A system daemon can contain several services. One of them is the registry
service that manages all other services. This patch adds support for this
service in the Gonk sensors daemon.
2016-02-03 15:16:00 +01:00
Thomas Zimmermann
25e228390d Bug 1194721: Add helpers for Gonk sensors daemon, r=gsvelto
This patch adds helpers for using the Gonk sensors daemon. The types
and functions allow for packing and unpacking messages of the daemon's
IPC protocol.
2016-02-03 15:16:00 +01:00
Birunthan Mohanathas
52ec90b7f0 Bug 1235261 - Part 6: Rename AutoInfallibleTArray to AutoTArray. r=froydnj 2016-02-02 17:36:31 +02:00
Birunthan Mohanathas
9bed3781f9 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda
863943dfb7 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas
f84f90b705 Bug 1235261 - Part 6: Rename AutoInfallibleTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Birunthan Mohanathas
f94b4ff6a2 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Kyle Huey
94f653c385 Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Wes Kocher
e5a6b681c9 Backed out changeset 2c56aed63687 (bug 1219482) to hopefully fix the intermittent hazard failures CLOSED TREE 2016-01-29 10:15:38 -08:00
Bill McCloskey
8916b1d998 Bug 1240871 - Don't allow implicit "async" in IPDL (r=mccr8,billm) 2016-01-28 20:56:37 -08:00
sajitk
faa12dafad Bug 1219482 - Replace PRLogModuleInfo with LazyLogModule in various files. r=bsmedberg 2016-01-28 10:35:00 -05:00
Phil Ringnalda
765d7b0dee Merge b-i to m-c, a=merge 2016-01-23 18:16:19 -08:00
Cervantes Yu
d72b8f6f37 Bug 1208418: Shut down UeventPoller on XPCOM shutdown to fix the crash when the chrome process exits. r=dhylands 2016-01-22 11:08:55 +08:00
Sylvestre Ledru
14ec5bc735 Bug 1218816 - Remove useless semicolons. Found by coccinelle. r=Ehsan 2016-01-22 16:58:49 +01:00
Chris Peterson
7aa1776928 Bug 1241549 - Annotate intentional switch fallthrough in hal/linux/UPowerClient.cpp. r=gsvelto
hal/linux/UPowerClient.cpp:420:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
2016-01-20 21:34:41 -08:00
Gabriele Svelto
02c6df1d54 Bug 1234176 - Introduce and use the WriteSysFile() helper function. r=dhylands 2015-12-29 11:49:50 +01:00
Thomas Zimmermann
cef48585f2 Bug 1232687: Add system-service interface to HAL, r=gsvelto
The new HAL interface allows for starting, stopping, and querying
the status of system services. How these operations are performed
depends on the underlying system.

The current implementation for Gonk already contains a workaround
from Bluetooth, where quickly restarted system services require a
cool-down time between retrys.
2016-01-04 16:08:21 +01:00
Gabriele Svelto
8f42f09dcd Bug 1207221 - Do not prevent the system app from vibrating when it is hidden. r=bz r=dhylands 2015-11-17 10:18:38 +01:00
Nigel Babu
843acd416a Backed out changeset 83f811be5016 (bug 1207221) for B2G JB emulator bustage due to warning 2015-11-13 16:01:26 +05:30
Gabriele Svelto
e69b61bb10 Bug 1207221 - Do not prevent the system app from vibrating when it is hidden. r=bz r=dhylands 2015-11-09 14:44:56 +01:00
Mike Hommey
1db89374d8 Bug 1221453 - Use AbsolutePaths with LOCAL_INCLUDES instead of manual -I in CXXFLAGS. r=gps 2015-11-06 09:59:21 +09:00
Birunthan Mohanathas
94998cf5fe Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Nicholas Nethercote
341a85e454 Bug 1187142 - Replace nsBaseHashtable::Enumerate() calls in hal/ with iterators. r=dhylands. 2015-10-19 21:52:44 -07:00
Nicholas Nethercote
9b7481cc46 Bug 1186792 - Replace nsBaseHashtable::EnumerateRead() calls in hal/ with iterators. r=dhylands. 2015-10-19 21:35:20 -07:00
Nathan Froyd
e4e2da55c9 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
2015-10-18 01:24:48 -04:00
Nathan Froyd
5254890206 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
Reuben Morais
d4d8f9414f Bug 1172740 - Implement Android HAL backend for alarms. r=snorp 2015-10-01 14:40:53 -03:00
Chris Peterson
dd2fcb9b7d Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Nicholas Nethercote
69d088e45f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
2015-08-27 20:44:53 -07:00