Andrew McCreight
0bdfc8411c
Bug 1864522 - Remove unused functionality from ModifyWakeLock. r=gsvelto
...
- WakeLock is never registered as an observer, so remove its nsIObserver
interface to eliminate a use of mContentParentID.
- mContentParentID is always CONTENT_PROCESS_ID_UNKNOWN, so propagate that
through to hal::ModifyWakeLock().
- Compute the child ID on the receiver side of the ModifyWakeLock message,
instead of passing it in the message. We always use the child ID of the
ContentChild.
- Rename the old ModifyWakeLock into ModifyWakeLockWithChildID. Rename
aProcessID to aChildID, because it is not a PID.
- Add a new hal::ModifyWakeLock for the parent process that uses
CONTENT_PROCESS_ID_MAIN as the child id. This method is not actually called
right now.
Differential Revision: https://phabricator.services.mozilla.com/D193577
2023-11-16 00:14:10 +00:00
Florian Quèze
c61b811f78
Bug 1747138 - Breakdown CPU and GPU time by process type, r=chutten,gsvelto
...
Differential Revision: https://phabricator.services.mozilla.com/D134441
2022-02-03 20:37:21 +00:00
smolnar
c3e516dd0e
Backed out changeset cd96e020a609 (bug 1747138) for causing bc failures in browser_telemetry_video_hardware_decoding_support. CLOSED TREE
2022-02-03 19:51:02 +02:00
Florian Quèze
f31dc8192a
Bug 1747138 - Breakdown CPU and GPU time by process type, r=chutten,gsvelto
...
Differential Revision: https://phabricator.services.mozilla.com/D134441
2022-02-03 12:20:15 +00:00
Simon Giesecke
c7a36b5d58
Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
...
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.
Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Simon Giesecke
d4b20a96d1
Bug 1691913 - Add some convenience methods to LookupResult and EntryHandle. r=xpcom-reviewers,nika
...
Differential Revision: https://phabricator.services.mozilla.com/D105475
2021-03-01 09:59:29 +00:00
Simon Giesecke
f21952f4bc
Bug 1691913 - Mark nsBaseHashtable (and its subclasses') member functions nodiscard where appropriate. r=xpcom-reviewers,necko-reviewers,dragana,nika
...
Differential Revision: https://phabricator.services.mozilla.com/D105474
2021-02-26 09:22:53 +00:00
Simon Giesecke
95c38cc6b8
Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
...
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.
Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke
8adc4d231c
Bug 1691894 - Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi
...
Differential Revision: https://phabricator.services.mozilla.com/D104849
2021-02-15 15:12:17 +00:00
smolnar
03bc7728ba
Backed out 5 changesets (bug 1691894) for causing hazard failures in nsXULPrototypeCache. CLOSED TREE
...
Backed out changeset 22dc870ee609 (bug 1691894)
Backed out changeset 58c31e9d6ae3 (bug 1691894)
Backed out changeset 7483e84149d8 (bug 1691894)
Backed out changeset f977d6cfa973 (bug 1691894)
Backed out changeset db4503476f34 (bug 1691894)
2021-02-15 16:43:23 +02:00
Simon Giesecke
1a0fd1ffb7
Bug 1691894 - Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi
...
Differential Revision: https://phabricator.services.mozilla.com/D104849
2021-02-15 10:04:45 +00:00
Simon Giesecke
46908cfb51
Bug 1660470 - Add missing include directives/forward declarations. r=nika
...
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Simon Giesecke
a69d79b6db
Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Simon Giesecke
cfe83618aa
Bug 1626570 - Improve handling of copying arrays in hal/. r=gsvelto
...
Differential Revision: https://phabricator.services.mozilla.com/D73637
2020-05-05 10:14:24 +00:00
Eric Rahm
daeb56f35b
Bug 1606187 - Part 2b: Update users of nsClassHashtable to handle UniquePtr differences r=KrisWright,froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D59042
2020-01-13 19:18:56 +00:00
Sylvestre Ledru
e5a134f73a
Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
...
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Gabriele Svelto
e76fa2194a
Bug 1509450 - Remove unnecessary inclusions of ContentParent.h and ContentChild.h r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D12728
2018-11-26 14:49:44 +00:00
Gabriele Svelto
5ba6ce6d43
Bug 1476250 - Simplify HAL initialization and shutdown to reduce the chance of leaks and UAFs r=froydnj
...
This patch initializes some HAL components greedily so that we can get rid of
lazy initializers within the code. Observers are still lazily initialized
because they can be instanced within content processes but that doesn't always
happen and we don't want to pay the memory price for structures we don't use.
Shutdown is now happening at a fixed time for all HAL components save
WakeLocks. This ensures that we don't destroy an object while still iterating
over it, something that could happen before.
Finally a workaround for a compiler limitation has been removed.
Differential Revision: https://phabricator.services.mozilla.com/D3100
2018-08-31 20:29:30 +00:00
Jonathan Watt
9c5b8de022
Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky
2016-06-07 21:10:18 +01:00
Nicholas Nethercote
b2665b01ba
Bug 1187142 - Replace nsBaseHashtable::Enumerate() calls in hal/ with iterators. r=dhylands.
2015-10-19 21:52:44 -07:00
Nicholas Nethercote
a136eba72a
Bug 1186792 - Replace nsBaseHashtable::EnumerateRead() calls in hal/ with iterators. r=dhylands.
2015-10-19 21:35:20 -07:00
Birunthan Mohanathas
a29151dc87
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
Ehsan Akhgari
ea41d8de48
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
90e9a301fe
Bug 1047277 - Hide HAL's logging macros from the public headers and convert all components to use them. r=dhylands
2014-09-24 15:23:18 +02:00
Benoit Jacob
e6d8526db4
Bug 1028588 - Fix dangerous public destructors in miscellaneous places - r=ehsan
2014-06-23 18:40:03 -04:00
Birunthan Mohanathas
eeb9aaaa94
Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj
2014-04-27 03:06:00 -04:00
Kyle Huey
0f60210229
Bug 994971: Don't export nsObserverService.h. r=bsmedberg
2014-04-14 12:04:27 -07:00
Ryan VanderMeulen
92561f7b14
Backed out changeset e2d5b2be4142 (bug 994971) for non-unified bustage.
...
CLOSED TREE
2014-04-14 18:27:52 -04:00
Kyle Huey
04564cc6ab
Bug 994971: Don't export nsObserverService.h. r=bsmedberg
2014-04-14 12:04:27 -07:00
Ehsan Akhgari
68bfe70f09
Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
...
This patch was automatically generated by the following script:
#!/bin/bash
# Command to convert PRUnichar to char16_t
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*modules/libmar*" \
! -wholename "*/.hg*" \
! -wholename "obj-ff-dbg*" \
! -name prtypes.h \
! -name Char16.h \
-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 PRUnichar char16_t
2014-01-04 10:02:17 -05:00
Ehsan Akhgari
57b6bc2653
Bug 942334 - Build hal in unified mode; r=cjones
2013-11-25 14:57:18 -05:00
Robert O'Callahan
51222bdd45
Bug 910989. Remove nsTHashtable::Init, fallible allocation, and MT hashtables. r=ehsan,bsmedberg
2013-09-02 20:41:57 +12:00
Justin Lebar
9439e121c5
Bug 870480 - Follow-up: Try to fix a warning-as-error.
...
> error: suggest parentheses around comparison in operand of '!='
2013-05-10 11:58:09 -04:00
Justin Lebar
4b651d8336
Bug 870480 - Notify wake lock listeners when a process adds or removes a wake lock, even if the wake lock itself doesn't change state. r=kanru
...
This also fixes two other bugs:
1) If a process crashed while holding a wake lock, we'd send a wake lock changed notification without including the list of locking processes. This could cause us to incorrectly believe that no processes were holding the lock.
2) If a process crashed while holding a wake lock on topic X, and if no other process held a wake lock on that topic, and there were no wake lock listeners registered, we wouldn't remove X from our hashtable of wake lock topics. We would correctly record the fact that the lock was not held, so this bug was benign.
2013-05-10 11:20:52 -04:00
Justin Lebar
8de351dbd3
Bug 836654 - Part 3: Modify hal to accept a ContentParent ID in ModifyWakeLock(). r=cjones
...
Also return the list of processes holding the lock in GetWakeLockInfo
and in the wake-lock changed notification.
2013-02-14 15:41:30 -05:00
Chris Jones
adb86a4e5b
Bug 822398: Use PL_DHASH_REMOVE to remove an entry we're enumerating. r=kanru
2012-12-27 02:43:55 -08:00
Kan-Ru Chen (陳侃如)
eba7765edd
Bug 814822 - Notify wake lock change when content crashes. r=jlebar
2012-11-27 10:28:11 +08:00
Kan-Ru Chen (陳侃如)
fa810c3692
Bug 806363 - Remove wake locks on content-shutdown. r=jlebar
2012-11-17 23:05:18 +08:00
Ehsan Akhgari
243c878d26
Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
...
This patch was generated by a script. Here's the source of the script for
future reference:
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*/.hg*" \
! -wholename "obj-ff-dbg*" \
! -name nsXPCOMCID.h \
! -name prtypes.h \
-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 PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t
convert PRIntn int
convert PRUintn unsigned
convert PRSize size_t
convert PROffset32 int32_t
convert PROffset64 int64_t
convert PRPtrdiff ptrdiff_t
convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Aryeh Gregor
8b4a23fc4c
Bug 777292 part 2 - Change all nsnull to nullptr
2012-07-30 17:20:58 +03:00
Rafael Ávila de Espíndola
b9c88a3cc8
Bug 774015 - Fix -Wdelete-non-virtual-dtor warning. r=justin.lebar
2012-07-15 11:13:15 -04:00
Kan-Ru Chen
698a89c41f
Bug 768364 - Clear sLockTable on shutdown r=jlebar
2012-07-06 10:09:46 +08:00
Kan-Ru Chen
d1a73de292
Bug 697132 - Implement wakelock interfaces. r=jlebar
2012-03-07 12:03:25 +01:00