Commit Graph

6045 Commits

Author SHA1 Message Date
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
Razvan Maries
481517ce87 Backed out 2 changesets (bug 1558394) for perma failures on iframe_sandbox_anchor_download_block_downloads.sub.tentative.html. CLOSED TREE
Backed out changeset 79046ff8143b (bug 1558394)
Backed out changeset e13ede3c68d4 (bug 1558394)
2020-05-15 19:18:34 +03:00
Sebastian Streich
bb0855332f Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-05-15 14:03:28 +00:00
Gian-Carlo Pascutto
ecee111c1f Bug 1553717 - Use Randomization on all arenas in non-Content Processes. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D70240
2020-05-13 08:31:04 +00:00
Bogdan Tara
edcb53f163 Backed out 2 changesets (bug 1558394) for nsDocShellLoadState related bustage CLOSED TREE
Backed out changeset 5889105bd089 (bug 1558394)
Backed out changeset 80a0ea17c9f8 (bug 1558394)
2020-05-14 15:17:32 +03:00
Sebastian Streich
9ce86dc585 Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-05-14 10:04:44 +00:00
Jean-Yves Avenard
929cb06b3c Bug 1637433 - P5. replace ConnectActorRunnable with lambda. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74996
2020-05-14 06:25:15 +00:00
Jean-Yves Avenard
e20155a010 Bug 1637433 - P4. Remove ForceCloseBackgroundActorsRunnable. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74995
2020-05-14 02:01:14 +00:00
Jean-Yves Avenard
7f2693d361 Bug 1637433 - P3. Remove unused class. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74994
2020-05-14 02:01:12 +00:00
Jean-Yves Avenard
d73d4e516d Bug 1637433 - P2. Replace ShutdownBackgroundThreadRunnable with simple task for clarity. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74993
2020-05-14 02:01:16 +00:00
Jean-Yves Avenard
1885d1e5ea Bug 1637433 - P1. Remove unused MessageLoop. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74992
2020-05-14 02:01:19 +00:00
Narcis Beleuzu
d0074be6df Backed out 5 changesets (bug 1637433) for build bustages. CLOSED TREE
Backed out changeset c0f62d4c134a (bug 1637433)
Backed out changeset 63e725b2ae8f (bug 1637433)
Backed out changeset b42efea62259 (bug 1637433)
Backed out changeset c58ca2f35ed9 (bug 1637433)
Backed out changeset 7059b1afe7a6 (bug 1637433)
2020-05-14 04:58:22 +03:00
Jean-Yves Avenard
09316a5aa4 Bug 1637433 - P5. replace ConnectActorRunnable with lambda. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74996
2020-05-14 00:26:34 +00:00
Jean-Yves Avenard
9ad952c7be Bug 1637433 - P4. Remove ForceCloseBackgroundActorsRunnable. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74995
2020-05-14 00:26:31 +00:00
Jean-Yves Avenard
452c248a30 Bug 1637433 - P3. Remove unused class. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74994
2020-05-14 00:26:22 +00:00
Jean-Yves Avenard
4629c7f6b2 Bug 1637433 - P2. Replace ShutdownBackgroundThreadRunnable with simple task for clarity. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74993
2020-05-14 00:47:45 +00:00
Jean-Yves Avenard
af15c09ca9 Bug 1637433 - P1. Remove unused MessageLoop. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74992
2020-05-14 00:45:43 +00:00
Csoregi Natalia
517e830522 Backed out 4 changesets (bug 1629866, bug 1570255) for assertion failures on DocumentChannelChild.cpp. CLOSED TREE
Backed out changeset 214e4a11be0d (bug 1570255)
Backed out changeset db066dda1bb8 (bug 1570255)
Backed out changeset d9f75d88613e (bug 1570255)
Backed out changeset fe2d4790b73a (bug 1629866)
2020-05-13 18:30:42 +03:00
Tim Huang
1fa1133990 Bug 1633851 - Part 1: Add a 'IsThirdPartyContextToTopWindow' flag to LoadInfo. r=baku
We add a 'IsThirdPartyContextToTopWindow' flag in the LoadInfo. This
flag shows if the channel is considered as a third party related to the
top-level window.

This flag would be set when opening the channel in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D73199
2020-05-13 13:38:41 +00:00
Peter Van der Beken
e2a88c491c Bug 1570255 - Remove sync session history implementation. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D65326
2020-05-13 14:24:55 +00:00
Jean-Yves Avenard
4e734f2a51 Bug 1592488 - P12. Run MozPromise's IPDL callbacks via direct tasks when the promise is resolved. r=nika
Fix intermittent issues due to races.

We now run the MozPromise generated by the IPDL bindings to run their callbacks via a direct task dispatch.
This avoids a full trip to the back of the event queue for each additional asynchronous step when using MozPromise.
A consequence to this change is that each IPDL actor's thread must have an AbstractThread allocated if IPDL MozPromises are used.

It prevents unexpected racy behaviours when combining MozPromise with the other Resolve/Reject IPDL async declaration which was have lead to processing the events out of order.

Differential Revision: https://phabricator.services.mozilla.com/D71593
2020-05-12 10:45:20 +00:00
Jean-Yves Avenard
2a740519c6 Bug 1592488 - P5. Ensure an AbstractThread exists with BackgroundThread. r=nika
This is necessary to ensure we can use IPC MozPromise that requires direct tasks dispatch.

Differential Revision: https://phabricator.services.mozilla.com/D74592
2020-05-12 10:43:07 +00:00
ssengupta
cf852bbfb9 Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73868
2020-05-12 19:02:05 +00:00
Andrew McCreight
f9c07914d4 Bug 1636990 - Inline NS_NewBackstagePass. r=kmag
Also, make an NS_ERROR in ~mozJSComponentLoader() into an assertion.

Differential Revision: https://phabricator.services.mozilla.com/D74691
2020-05-11 22:46:24 +00:00