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

241 Коммитов

Автор 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 c224c5ab31 Bug 1260672: Remove 'nsAutoPtr.h' and clean up includes of Gonk diskspace watcher, r=gsvelto 2016-03-30 13:18:00 +02:00
Thomas Zimmermann 4619f2620c Bug 1260672: Use |UniquePtr| for Gonk alarms, r=gsvelto 2016-03-30 13:18:00 +02:00
Thomas Zimmermann 0426b37d30 Bug 1260672: Use |UniquePtr| for Gonk sensors, r=gsvelto 2016-03-30 13:18:00 +02:00
Kyle Huey d9265a3eaf Bug 1259294: Part 2 - Use MOZ_ALWAYS_SUCCEEDS. r=froydnj 2016-03-28 10:28:15 -07:00
Gabriele Svelto 37f3999f8b Bug 1253571 - Remove the remaining uses of ScopedDeletePtr and ScopedFreePtr from the HAL and MTP code r=dhylands 2016-03-04 15:15:38 +01:00
Gabriele Svelto bebcf8822a Bug 1251179 - Ensure that the lock protecting the CPU sleep functionality is always valid r=dhylands 2016-02-27 14:34:51 +01:00
Thomas Zimmermann afdc357587 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 4d26ccee63 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 5cefc72986 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 a635d5ed48 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 24f81344e9 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 a7bbc5b9ff Backed out changeset 2a7dbf51f1e8 (bug 1194721) 2016-02-03 16:24:26 +01:00
Carsten "Tomcat" Book ff644fd078 Backed out changeset f817794c422b (bug 1194721) 2016-02-03 16:24:25 +01:00
Carsten "Tomcat" Book ab6b9d0590 Backed out changeset 6a5db0961a0a (bug 1194721) 2016-02-03 16:24:23 +01:00
Carsten "Tomcat" Book aca3e4db63 Backed out changeset 15a9b3c68084 (bug 1194721) 2016-02-03 16:24:22 +01:00
Carsten "Tomcat" Book dbe468defa Backed out changeset 8adcb4e83cf4 (bug 1194721) 2016-02-03 16:24:20 +01:00
Thomas Zimmermann f871eee080 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 3b2ccfc21f 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 46ae306967 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 91bb68fbc4 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 3951be0bb5 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 d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda d381b4bca6 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 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Cervantes Yu 07b88c8567 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
Gabriele Svelto c7edb0ffaf Bug 1234176 - Introduce and use the WriteSysFile() helper function. r=dhylands
--HG--
extra : rebase_source : c976b7434f660bc7b5fdc19bce800990c96443cb
2015-12-29 11:49:50 +01:00
Thomas Zimmermann 27283de2b8 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
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
William Chen 3c9928ced9 Bug 1131470 - Part 1: Rename existing use of ScreenOrientation to ScreenOrientationInternal. r=baku
--HG--
extra : rebase_source : 72e978d48e8356da9e8c66adfa0a97983034aa5a
2015-08-18 14:55:09 -07:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Julian Seward 5db797db1b Bug 1125084 - Uninitialised value use in mozilla::hal_impl::SetScreenBrightness(double). r=dhylands. 2015-05-29 13:21:36 +02:00
Julian Seward c46d573f85 Bug 1167581 - Inconsistent pre-zeroing of ioctl buffers in gecko/hal/gonk/GonkFMRadio.cpp. r=mwu. 2015-05-28 15:02:41 +02:00
Julian Seward 5c409379a6 Bug 1123628 - mozilla::hal_impl::PriorityClass::~PriorityClass() closes not-open files. r=dhylands.
--HG--
extra : rebase_source : 672e15f1238948b9053da8dcf098f787fc6655aa
2015-05-26 19:36:51 +02:00
Fabrice Desré 2600fa2b93 Bug 1167817 - Switch back to printf_stderr in GonkDiskSpaceWatcher.cpp r=dhylands 2015-05-25 21:34:44 -07:00
JerryShih 19b89aae4e Bug 1167535 - Fix fanotify 4g size limit. r=fabrice 2015-05-22 11:20:00 -04:00
Zibi Braniecki c29571c802 Bug 1163245 - [Battery][Gonk] Implementation of battery discharging remaining time. r=dhylands 2015-05-13 09:35:57 -07:00
Sotaro Ikeda e2d6f1ea99 Bug 1091037 - Raise ImageBridge thread priority r=gsvelto,nical 2015-05-07 06:53:47 -07:00
Sotaro Ikeda ed293afca5 Bug 1157874 - Remove screen related global variables from nsWindow.cpp r=mwu 2015-04-29 20:17:57 -07:00
Vladimir Vukicevic 32d8dbc20e Bug 1144674; Implement HAL support for ROTATION_VECTOR and GAME_ROTATION_VECTOR sensors; r=snorp 2015-04-01 16:02:20 -04: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
Gabriele Svelto 243ffd8828 Bug 892371 - Adjust oom_score_adj values for foreground processes according to an LRU policy. r=dhylands, r=khuey 2015-02-25 09:37:38 +01:00
dannyliang 4c9fd552c7 Bug 1116368 - Implementation of battery charging remaining time. r=dhylands 2015-03-10 23:41:00 -04:00
Thomas Zimmermann b863aa329a Bug 1137151: Marked destructors of ref-counted GonkHAL classes as protected, r=dhylands 2015-03-10 13:44:02 +01:00
Gabriele Svelto 1f8afa872a Bug 1119277 - Remove the process CPU priority parameter and simplify all the associated code. r=khuey, r=dhylands 2015-02-26 12:43:22 +01:00
Dave Hylands c5ff7b0427 Bug 1082290 - Add memory cgroup support to FxOS process control. r=gsvelto 2015-01-12 14:19:00 -05:00
Gabriele Svelto d800fbc91b Bug 1081871 - part 2 - Use cgroups instead of nice values to implement application priorities. r=dhylands 2015-01-08 15:39:43 +01:00
Gabriele Svelto 72bb309318 Bug 1081871 - part 1 - Remove dead code and do some minor code style cleanups. r=dhylands 2015-01-08 15:39:38 +01:00