Commit Graph

6068 Commits

Author SHA1 Message Date
Jean-Yves Avenard
c7ce1ad8f3 Bug 1644009 - P6. Revert "Bug 1592488 - P5. Ensure an AbstractThread exists with BackgroundThread." r=nika
DirectTask dispatching will now be directly handled by nsThread.

Differential Revision: https://phabricator.services.mozilla.com/D79090
2020-06-12 05:10:03 +00:00
Ryan VanderMeulen
96581380fe Backed out changeset 454c8a5739ac (bug 1634765) so an intent to deprecate email can be sent out first.
CLOSED TREE
2020-06-11 15:24:33 -04:00
Stephen A Pohl
35ee005dee Bug 1634765: Drop support for (and prevent from running on) macOS versions below 10.12. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D73516
2020-06-11 15:41:46 +00:00
Nico Grunbaum
8108184b4f Bug 1637450 - Add Video Frame statistics to about:webrtc;r=bwc,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D75073
2020-06-10 16:34:25 +00:00
ssengupta
1673ecbe85 Bug 1636050 - PCacheStreamControl protocol is now refcounted r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D78857
2020-06-09 12:58:44 +00:00
Anny Gakhokidze
32add40b99 Bug 1631859 - Part 2: Remove ancestor data from LoadInfoArgs, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D78407
2020-06-08 19:58:21 +00:00
Anny Gakhokidze
21a581c031 Bug 1631859 - Part 1: Fill out ancestor principals and outer window IDs for LoadInfo only in the parent, r=kmag,extension-reviewers
Keeping a list of ancestor principals in a LoadInfo object, that, at times,
exists in the content process, is not secure. Since ancestor principals are
only ever needed to create a list of frameAncestors, which, in turn, are only
ever accessed from the parent process, we can assemble lists of ancestor
principals and outer windowIDs whenever we are in the parent process and are
either 1) creating a LoadInfo object or 2) deserializing a LoadInfoArgs struct,
received from content process, into a LoadInfo object.

Differential Revision: https://phabricator.services.mozilla.com/D78406
2020-06-08 19:58:14 +00:00
Andrew McCreight
4ddbe0f20c Bug 1642738, part 2 - Make the message arg to two more MessageChannel send methods into a UniquePtr. r=froydnj
The reply argument that gets passed in is a stack reference which is move
assigned into, so it doesn't make sense as a unique pointer, although the
code could be restructured to return a freshly allocated object instead.

This mostly just eliminates a spurious round trip from UniquePtr to *
and back. The bulk of the patch is renaming uses of |msg| to |aMsg|.

Differential Revision: https://phabricator.services.mozilla.com/D77908
2020-06-02 21:26:37 +00:00
Andrew McCreight
1ffaefe509 Bug 1642738, part 1 - Make the non-reply MessageChannel Send messages take a UniquePtr. r=froydnj
This fixes the leak of a ShmemCreated in the case where ShareHandle fails.

Differential Revision: https://phabricator.services.mozilla.com/D77907
2020-06-02 21:25:27 +00:00
Calixte Denizet
2f9403d63b Bug 1637377 - Avoid dead lock on user-requested ccov dumps r=marco
Gcc and Clang dumps gcda files just before an exec** or fork functions.
With ccov enabled, we can dump using a SIGUSR1 but if we're in the middle of dump (because of exec** or fork)
then a gcda file can stay locked and then another process can try to get a lock on it for ever.
So to avoid such a situation, we remove the SIGUSR1 handler just before the fork an set it back just after.

Differential Revision: https://phabricator.services.mozilla.com/D78051
2020-06-03 15:06:58 +00:00
Andrew McCreight
61b98a05d9 Bug 1642670 - Make ChannelImpl::output_queue_ use UniquePtr. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D77906
2020-06-02 21:24:18 +00:00
Andrew McCreight
8eefcc3e76 Bug 1642631 - Make the message argument to Channel::Send() a UniquePtr. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D77876
2020-06-02 21:23:08 +00:00
Andrew McCreight
82c3c9a58a Bug 1642619 - Remove the unused MessageChannel::Echo(). r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D77804
2020-06-02 13:56:07 +00:00
Andrew McCreight
3815405934 Bug 1641090, part 10 - Remove base/hash_tables.h. r=nika
The remaining use is trivial, defining some hash functions that are never used.

Differential Revision: https://phabricator.services.mozilla.com/D76986
2020-05-28 15:55:18 +00:00
Andrew McCreight
afe901a409 Bug 1641090, part 9 - Change IDMap into an alias for nsDataHashtable. r=nika
Now that IDMap is just a thin wrapper around an nsDataHashtable,
it is easy to convert it into an alias.

Differential Revision: https://phabricator.services.mozilla.com/D77169
2020-05-28 15:55:16 +00:00
Andrew McCreight
c2b4431985 Bug 1641090, part 8 - Convert IDMap to use nsDataHashtable internally. r=nika
This is more standard, and uses about 4kb less memory when almost empty,
which seems to be the common case in an idle content process. This should save
around 66kb per content process.

The next patch will get ride of this thin wrapper and use nsDataHashtable
directly.

Differential Revision: https://phabricator.services.mozilla.com/D76985
2020-05-28 15:55:08 +00:00
Andrew McCreight
99f0a4ef9d Bug 1641090, part 7 - Rename IDMap::Lookup to Get. r=nika
This is to further match nsTHashtable's interface.

Differential Revision: https://phabricator.services.mozilla.com/D77168
2020-05-28 15:55:06 +00:00
Andrew McCreight
5fdbb56cfb Bug 1641090, part 6 - Make ReplaceWithID compatible with nsTHashtable's Put. r=nika
This method is the same as Put(), except that it asserts that the item
is not already present. It also puts the key second. Make it compatible
by hoisting out the assert and reversing the arguments. We can use the
definition of Put() defined in an earlier patch.

Differential Revision: https://phabricator.services.mozilla.com/D77167
2020-05-28 15:55:03 +00:00
Andrew McCreight
7482de916e Bug 1641090, part 5 - Make IDMap::Remove match nsTHashtable's behavior. r=nika
nsTHashtable::Remove doesn't assert if the item isn't present. Match that
behavior by removing the assert and putting it at all of the call sites.

This just turns IDMap::Remove into RemoveIfPresent, so merge them.

Differential Revision: https://phabricator.services.mozilla.com/D77166
2020-05-28 15:55:01 +00:00
Andrew McCreight
1fc2cdf98d Bug 1641090, part 4 - Make AddWithID compatible into Put. r=nika
This function is similar to the Put() method in nsTHashtable, but it lists the
key second and it asserts that the key is not already in the map. This patch
swaps the arguments and hoists the assertion out, where appropriate. Note that
there are a few places that were working around this assert, so for those places
don't include the assert.

Differential Revision: https://phabricator.services.mozilla.com/D77165
2020-05-28 15:54:59 +00:00
Andrew McCreight
1a16eaf7d6 Bug 1641090, part 3 - Add and use a new Contains predicate. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D77164
2020-05-28 15:54:56 +00:00
Andrew McCreight
a00f6161a9 Bug 1641090, part 2 - Inline IDMap::HasData. r=nika
It is only used in one place, so get rid of it. Also, iterate in a nicer way.

Differential Revision: https://phabricator.services.mozilla.com/D77163
2020-05-28 15:54:54 +00:00
Andrew McCreight
077aa3dc7e Bug 1641090, part 1 - Remove unused methods and an unused field from IDMap. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D77162
2020-05-28 15:54:52 +00:00
Csoregi Natalia
b4ad19225c Backed out 10 changesets (bug 1641090) for asan bustage on ProtocolFuzzer.h. CLOSED TREE
Backed out changeset 9c5e95745919 (bug 1641090)
Backed out changeset df8809d1542b (bug 1641090)
Backed out changeset 92cde6ee6ade (bug 1641090)
Backed out changeset 23d5d734d0bd (bug 1641090)
Backed out changeset 6af841322f4d (bug 1641090)
Backed out changeset 2ce016edb6fc (bug 1641090)
Backed out changeset a513d47956f9 (bug 1641090)
Backed out changeset 48bc9ce7afeb (bug 1641090)
Backed out changeset 173a1c2e3e55 (bug 1641090)
Backed out changeset c915cb660411 (bug 1641090)
2020-05-28 08:51:13 +03:00
Andrew McCreight
d76f77f616 Bug 1641090, part 10 - Remove base/hash_tables.h. r=nika
The remaining use is trivial, defining some hash functions that are never used.

Differential Revision: https://phabricator.services.mozilla.com/D76986
2020-05-27 22:07:47 +00:00
Andrew McCreight
c93adfb04f Bug 1641090, part 9 - Change IDMap into an alias for nsDataHashtable. r=nika
Now that IDMap is just a thin wrapper around an nsDataHashtable,
it is easy to convert it into an alias.

Differential Revision: https://phabricator.services.mozilla.com/D77169
2020-05-28 00:54:21 +00:00
Andrew McCreight
81acc5f0da Bug 1641090, part 8 - Convert IDMap to use nsDataHashtable internally. r=nika
This is more standard, and uses about 4kb less memory when almost empty,
which seems to be the common case in an idle content process. This should save
around 66kb per content process.

The next patch will get ride of this thin wrapper and use nsDataHashtable
directly.

Differential Revision: https://phabricator.services.mozilla.com/D76985
2020-05-27 23:59:41 +00:00
Andrew McCreight
be7c7206db Bug 1641090, part 7 - Rename IDMap::Lookup to Get. r=nika
This is to further match nsTHashtable's interface.

Differential Revision: https://phabricator.services.mozilla.com/D77168
2020-05-27 23:59:39 +00:00
Andrew McCreight
064fa8de6e Bug 1641090, part 6 - Make ReplaceWithID compatible with nsTHashtable's Put. r=nika
This method is the same as Put(), except that it asserts that the item
is not already present. It also puts the key second. Make it compatible
by hoisting out the assert and reversing the arguments. We can use the
definition of Put() defined in an earlier patch.

Differential Revision: https://phabricator.services.mozilla.com/D77167
2020-05-27 23:59:36 +00:00
Andrew McCreight
de620fecfb Bug 1641090, part 5 - Make IDMap::Remove match nsTHashtable's behavior. r=nika
nsTHashtable::Remove doesn't assert if the item isn't present. Match that
behavior by removing the assert and putting it at all of the call sites.

This just turns IDMap::Remove into RemoveIfPresent, so merge them.

Differential Revision: https://phabricator.services.mozilla.com/D77166
2020-05-27 23:59:34 +00:00
Andrew McCreight
4e909e4e75 Bug 1641090, part 4 - Make AddWithID compatible into Put. r=nika
This function is similar to the Put() method in nsTHashtable, but it lists the
key second and it asserts that the key is not already in the map. This patch
swaps the arguments and hoists the assertion out, where appropriate. Note that
there are a few places that were working around this assert, so for those places
don't include the assert.

Differential Revision: https://phabricator.services.mozilla.com/D77165
2020-05-27 23:59:32 +00:00
Andrew McCreight
35ea3b560b Bug 1641090, part 3 - Add and use a new Contains predicate. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D77164
2020-05-27 23:59:29 +00:00
Andrew McCreight
8b534e1748 Bug 1641090, part 2 - Inline IDMap::HasData. r=nika
It is only used in one place, so get rid of it. Also, iterate in a nicer way.

Differential Revision: https://phabricator.services.mozilla.com/D77163
2020-05-27 23:59:27 +00:00
Andrew McCreight
aaead092ca Bug 1641090, part 1 - Remove unused methods and an unused field from IDMap. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D77162
2020-05-27 23:59:25 +00:00
Andrew McCreight
45fd231644 Bug 1641091, part 3 - Remove some methods that always return null. r=froydnj
GetConstructedEventTarget and GetSpecificMessageEventTarget always return
null. The idea was that subclasses could override them, but nobody does any
more.

Differential Revision: https://phabricator.services.mozilla.com/D76984
2020-05-27 13:58:39 +00:00
Andrew McCreight
a6091e070f Bug 1641091, part 2 - Remove unused SetEventTargetForRoute methods. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D76983
2020-05-27 13:58:37 +00:00
Nika Layzell
01f5ec3468 Bug 1635720 - Abort send attempt if malformed partial_write_iter_ is found, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D76740
2020-05-26 16:39:41 +00:00
Gian-Carlo Pascutto
c7ba6789e7 Bug 1638293 - Fix missing definition of self in BaseProcessLauncher. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D76004
2020-05-22 21:08:02 +00:00
Sylvestre Ledru
615c83d723 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D76451
2020-05-25 07:42:38 +00:00
Gijs Kruitbosch
38b061ef45 Bug 1638373 - remove js/ipc now that CPOWs are dead, r=mccr8
Depends on D76597

Differential Revision: https://phabricator.services.mozilla.com/D76598
2020-05-24 18:47:04 +00:00
Nathan Froyd
5e67b31c1f Bug 1639837 - make CloseFileRunnable use mozilla::Runnable; r=jld
Differential Revision: https://phabricator.services.mozilla.com/D76300
2020-05-22 22:36:59 +00:00
Nathan Froyd
1c9fd5bc7c Bug 1635720 - add diagnostic asserts for outgoing IPC messages; r=jld,nika
We are seeing crashes on aarch64 Fenix devices that appear to be related
to zero-sized messages.  But we're seeing the crashes when we're trying
to send the messages on the IO thread, and not where we're dispatching
them from.  Add some asserts so we get errors closer to the source, and
add some asserts for other things that we believe to be true and would
be useful to know aren't actually true.

Differential Revision: https://phabricator.services.mozilla.com/D76496
2020-05-22 22:25:27 +00:00
Bob Owen
5ef9be5d40 Bug 1633791 part 1: Add ability to notify the child processes of an impending shutdown. r=nika
This also adds a call to the new function in ContentParent::StartForceKillTimer.

Differential Revision: https://phabricator.services.mozilla.com/D75507
2020-05-22 18:21:59 +00:00
Chris H-C
1a7bcf4c98 Bug 1635713 - Be explicit about SampleSet copies r=janerik
This also removes a copy during clear operations, which is nice I guess.

Differential Revision: https://phabricator.services.mozilla.com/D76328
2020-05-22 15:33:17 +00:00
Emilio Cobos Álvarez
7b19f0d6d4 Bug 1609024 - Remove cache mechanism which is not very useful. r=hiro,snorp,mccr8
I don't think all this complexity is worth it for having a
marginally-more-realistic testing story. Using the pref just works and we should
do that, I think.

Differential Revision: https://phabricator.services.mozilla.com/D59980
2020-05-21 17:02:06 +00:00
Peter Van der Beken
1990918ebe Bug 1570255 - Remove sync session history implementation. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D65326
2020-05-20 09:09:06 +00:00
Nika Layzell
533fa5bd14 Bug 1635689 - Part 2: Stop generating 'get' method on IPDL unions, r=jld
This method always copies, and is redundant with the other getter methods on
IPDL unions. As there is only one caller, it can be removed to simplify the
code, and remove a source of complexity.

Differential Revision: https://phabricator.services.mozilla.com/D75349
2020-05-18 19:39:54 +00:00
Eden Chuang
16b5f23697 Bug 1532287 - P2 Propagate loading document/worker's COEP to nsHttpChannel through nsILoadInfo r=necko-reviewers,valentin,JuniorHsu
Currently, the worker's COEP is saved in WorkerPrivate and not be respected when loading resources in workers.
This patch adds an attribute loadingEmbedderPolicy in nsILoadInfo, which indicates the COEP header the loading must be respected.

The default value of loadingEmbedderPolicy is nsILoadInfo::EMBEDDER_POLICY_NULL.
loadingEmbedderPolicy is initialized with the COEP of the BrowsingContext used for creating LoadInfo.
And it could be set to other value when fetch in workers.

Differential Revision: https://phabricator.services.mozilla.com/D73690
2020-05-19 12:50:39 +00:00
nicolaspacheco
72803335c4 Bug 1622166 - Change variadic functions from the old recursive way using Fold expressions r=gerald,jld
Differential Revision: https://phabricator.services.mozilla.com/D70431
2020-05-14 16:31:17 +00:00
Aaron Klotz
370decf41a Bug 1637452: Part 8 - Fix JNI includes in ipc/glue; r=jld
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75371
2020-05-15 17:04:34 +00:00