Commit Graph

1597 Commits

Author SHA1 Message Date
Florian Quèze
673e38408d Bug 1719218 - Build ProfilerParent even when MOZ_GECKO_PROFILER is not defined, r=gerald,necko-reviewers,nika,dragana.
Differential Revision: https://phabricator.services.mozilla.com/D119131
2021-07-08 16:20:08 +00:00
Eden Chuang
4ce2d06b79 Bug 1714299 - Correct the opaque response judgment for opaque response blocking. r=necko-reviewers,annevk,dragana
An opaque response should be not only cross-origin but also be request with no_cors request mode.

To filter out the request with mode Same_origin, navigate, and cors. This patch reuses the algorithm in InternalRequest/FetchDriver to decide whether a response is an opaque response.

https://searchfox.org/mozilla-central/rev/da5d08750e504f3710f7ea051327d9c311c39902/dom/fetch/InternalRequest.cpp#331
https://searchfox.org/mozilla-central/rev/da5d08750e504f3710f7ea051327d9c311c39902/dom/fetch/FetchDriver.cpp#1153,1157

Differential Revision: https://phabricator.services.mozilla.com/D117086
2021-07-02 23:11:55 +00:00
Nika Layzell
7802bbb486 Bug 1706374 - Part 12b: Use NodeController for primary process channels, r=handyman
This extends on the changes in part 12a and consumes the new PortRef-based API
in all existing process types other than the fork server. The IPDL C++ unit
tests were already broken before this change, and were not updated.

Differential Revision: https://phabricator.services.mozilla.com/D112777
2021-06-22 18:17:23 +00:00
Butkovits Atila
83f57b5c69 Backed out 22 changesets (bug 1714226, bug 1706374, bug 1713148) for causing build bustages on MessageChannel.cpp. CLOSED TREE
Backed out changeset ea469eaa54ca (bug 1713148)
Backed out changeset fd8523d5126e (bug 1713148)
Backed out changeset f2e5309c914c (bug 1713148)
Backed out changeset 2da57973ed55 (bug 1713148)
Backed out changeset 677e1ee99bb2 (bug 1713148)
Backed out changeset b4c0619e79bf (bug 1706374)
Backed out changeset c02fa459e77d (bug 1706374)
Backed out changeset 72dc6537cf0b (bug 1706374)
Backed out changeset 48088463c656 (bug 1706374)
Backed out changeset b09ae4c3a94b (bug 1706374)
Backed out changeset 04422175004b (bug 1706374)
Backed out changeset 110b2384e7d1 (bug 1706374)
Backed out changeset ab2b086abbd4 (bug 1706374)
Backed out changeset ffde07f73249 (bug 1706374)
Backed out changeset c6303af17ff4 (bug 1706374)
Backed out changeset 02249671c2f9 (bug 1706374)
Backed out changeset a6a5d05b5636 (bug 1706374)
Backed out changeset e21b6defb805 (bug 1706374)
Backed out changeset c72c5be9ddb1 (bug 1706374)
Backed out changeset 23cd961575a6 (bug 1706374)
Backed out changeset b412d6e9e145 (bug 1706374)
Backed out changeset a8ec285d6472 (bug 1714226)
2021-06-22 04:03:56 +03:00
Nika Layzell
1d4aba6770 Bug 1706374 - Part 12b: Use NodeController for primary process channels, r=handyman
This extends on the changes in part 12a and consumes the new PortRef-based API
in all existing process types other than the fork server. The IPDL C++ unit
tests were already broken before this change, and were not updated.

Differential Revision: https://phabricator.services.mozilla.com/D112777
2021-06-21 21:53:11 +00:00
Peter Van der Beken
74315d236b Bug 1715884 - Call DisconnectChildListeners directly if we've already put a BC in the BFCache. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D118299
2021-06-21 10:35:28 +00:00
Peter Van der Beken
71e7900a51 Bug 1711544 - Move decision about name resetting to the parent process if we're replacing the BC for BFCache in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116759
2021-06-21 10:31:36 +00:00
Landry Breuil
b3105e9b6d Bug 1713999 - Sandbox the socket process on OpenBSD r=gcp,necko-reviewers
as done on windows, and as tested with RDD sandboxing in
https://phabricator.services.mozilla.com/D116635, preload the necessary
nss libs before sandboxing. Untested at runtime yet.

Depends on D116640

Differential Revision: https://phabricator.services.mozilla.com/D116641
2021-06-15 08:48:35 +00:00
Valentin Gosu
1a1f42da37 Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw
This changeset is the result of adding modernize-use-default-member-init to
tools/clang-tidy/config.yaml then proceeding to run
`./mach static-analysis check netwerk/ --fix`
I then went through the resulting fix and manually updated all of the member
variables which were missed due to them having a non-trivial constructor.

Note that the tool was only run on Linux, so code that only runs on some
platforms may have been missed.

The member variables that are still initialized in the contructor definition
are:
  - bitfields (not all currently supported compilers allow default-member-init
  - variables that are initialized via a parameter
  - variables that use code not visible in the header file

There are a few advantages to landing this change:
- fewer lines of code - now declaration is in the same place as initialization
  this also makes it easier to see when looking at the header.
- it makes it harder to miss initializing a member when adding a new contructor
- variables that depend on an include guard look much nicer now

Additionally I removed some unnecessary reinitialization of NetAddr members
(it has a constructor that does that now), and changed nsWifiScannerDBus to
use the thread-safe strtok_r instead of strtok.

Differential Revision: https://phabricator.services.mozilla.com/D116980
2021-06-11 07:10:41 +00:00
Csoregi Natalia
938a6943c6 Backed out changeset 6e00f8bd2acc (bug 1714307) for causing hazard bustage. CLOSED TREE 2021-06-09 21:50:03 +03:00
Valentin Gosu
d1513f313e Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw
This changeset is the result of adding modernize-use-default-member-init to
tools/clang-tidy/config.yaml then proceeding to run
`./mach static-analysis check netwerk/ --fix`
I then went through the resulting fix and manually updated all of the member
variables which were missed due to them having a non-trivial constructor.

Note that the tool was only run on Linux, so code that only runs on some
platforms may have been missed.

The member variables that are still initialized in the contructor definition
are:
  - bitfields (not all currently supported compilers allow default-member-init
  - variables that are initialized via a parameter
  - variables that use code not visible in the header file

There are a few advantages to landing this change:
- fewer lines of code - now declaration is in the same place as initialization
  this also makes it easier to see when looking at the header.
- it makes it harder to miss initializing a member when adding a new contructor
- variables that depend on an include guard look much nicer now

Additionally I removed some unnecessary reinitialization of NetAddr members
(it has a constructor that does that now), and changed nsWifiScannerDBus to
use the thread-safe strtok_r instead of strtok.

Differential Revision: https://phabricator.services.mozilla.com/D116980
2021-06-09 10:20:04 +00:00
Nika Layzell
1aaeb179e2 Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117103
2021-06-09 04:56:48 +00:00
Valentin Gosu
d595491cc7 Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D116701
2021-06-04 12:35:16 +00:00
Butkovits Atila
692bda1ca1 Backed out changeset c4b44c4ef15b (bug 1714307) for causing build bustages on nsHTTPCompressConv.h. CLOSED TREE 2021-06-04 13:53:37 +03:00
Valentin Gosu
98146ae90b Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D116701
2021-06-04 10:00:55 +00:00
Olli Pettay
b27238627f Bug 1713365, don't try to bfcache if the session history entry already has a frameloader, r=peterv
The crash happens currently when there are more than one loading session history entries at the same time and when
the latter load then accesses current active entry, it has already the bfcached frameloader.

I have tried and failed to write a testcase for this. The Pernosco record is from running
https://searchfox.org/mozilla-central/source/devtools/client/webconsole/test/browser/browser_webconsole_message_categories.js
and the crash has happened when there is a race condition between a load initiated in the parent process and another load initiated in a child
process.

The patch tries to make the setup rather safe. If active entry has changed or it has gotten frameloader, don't try to bfcache.

Differential Revision: https://phabricator.services.mozilla.com/D116410
2021-06-03 20:34:24 +00:00
Nika Layzell
7168587605 Bug 1709346 - Part 1: Track BrowsingContextWebProgress for subframes, r=mattwoodrow,kmag,necko-reviewers
This allows loads to be tracked as they are ongoing on a per-context basis in
the parent process, and for events to be generated for each subframe as it is
destroyed.

This patch also stops sending the `IsLoadingDocument` flag on the request to
the main process and removes RemoteWebProgress, as they are no longer necessary
due to being tracked directly.

Finally this patch also adds some logging to BrowsingContextWebProgress
to make it easier to diagnose this type of issue in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115706
2021-06-03 16:59:32 +00:00
Alexandre Lissy
6b5f586e94 Bug 1710625 - SandboxTest with SocketProcess r=necko-reviewers,handyman,jld,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D114861
2021-06-03 06:45:59 +00:00
Tim Huang
d7220a241a Bug 1706615 - Part 1: Add a UnstrippedURI into the LoadInfo. r=valentin,necko-reviewers
This patch adds a UnstrippedURI into the LoadInfo. This attribute
represents the channel's URI has been stripped if this attributes is not
a nullptr.

Having this attribute allows us to be able to revert the query stripping
in the case where the loading channel is in the content blocking allow
list in the parent process.

In addition, this patch removes the main thread assertion in URIUtils
given that we've made the URL construction thread-safe. This will allow
us to be able to use nsIURI directly in ParentLoadInfoForwarderArgs.

Differential Revision: https://phabricator.services.mozilla.com/D116108
2021-06-02 19:46:19 +00:00
lyavor
8c341a47c7 Bug 1709552 HTTPS-First: 4xx and 5xx error responses might need a downgrade. r=ckerschb,necko-reviewers,valentin,JulianWels
Differential Revision: https://phabricator.services.mozilla.com/D114749
2021-06-02 08:35:22 +00:00
Csoregi Natalia
15d4f16e13 Backed out 2 changesets (bug 1709346) for causing XPCConvert crashes. CLOSED TREE
Backed out changeset 7c1e15680741 (bug 1709346)
Backed out changeset 34eff3430674 (bug 1709346)
2021-05-26 00:32:25 +03:00
Nika Layzell
804c0c75da Bug 1709346 - Part 1: Track BrowsingContextWebProgress for subframes, r=mattwoodrow,kmag,necko-reviewers
This allows loads to be tracked as they are ongoing on a per-context basis in
the parent process, and for events to be generated for each subframe as it is
destroyed.

This patch also stops sending the `IsLoadingDocument` flag on the request to
the main process and removes RemoteWebProgress, as they are no longer necessary
due to being tracked directly.

Finally this patch also adds some logging to BrowsingContextWebProgress
to make it easier to diagnose this type of issue in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115706
2021-05-25 17:31:53 +00:00
Butkovits Atila
8ef6ea3d5d Backed out 2 changesets (bug 1709346) for causing failures on browser_bug1709346.js. CLOSED TREE
Backed out changeset 19df1a8bfacc (bug 1709346)
Backed out changeset 602a7b4a41de (bug 1709346)
2021-05-25 19:52:49 +03:00
Nika Layzell
a013b4d74e Bug 1709346 - Part 1: Track BrowsingContextWebProgress for subframes, r=mattwoodrow,kmag,necko-reviewers
This allows loads to be tracked as they are ongoing on a per-context basis in
the parent process, and for events to be generated for each subframe as it is
destroyed.

This patch also stops sending the `IsLoadingDocument` flag on the request to
the main process and removes RemoteWebProgress, as they are no longer necessary
due to being tracked directly.

Finally this patch also adds some logging to BrowsingContextWebProgress
to make it easier to diagnose this type of issue in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115706
2021-05-25 15:54:48 +00:00
Kershaw Chang
bae5af4064 Bug 1710641 - Use fallback connection to deal with fast fallback, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D115002
2021-05-21 07:08:47 +00:00
Kershaw Chang
8394bdd6d1 Bug 1491084 - Remove unused code that shows http auth prompt for nested content process, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D115374
2021-05-18 19:43:05 +00:00
Peter Van der Beken
3e785c9c12 Bug 1696175 - Call DisconnectChildListeners at a later time for BFCache in the parent. r=necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D112981
2021-05-13 15:38:01 +00:00
Valentin Gosu
b6c4d8cd4d Bug 1574475 - Stop compiling FTP code r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111245
2021-04-28 09:33:45 +00:00
Narcis Beleuzu
33cc31099d Backed out 8 changesets (bug 1574475, bug 1699222) for build bustages on moz.build . CLOSED TREE
Backed out changeset 6c2c039872b3 (bug 1574475)
Backed out changeset 8a2a04743c5f (bug 1699222)
Backed out changeset 9437c60798d6 (bug 1574475)
Backed out changeset 7ef1884ac11b (bug 1574475)
Backed out changeset ec8c237d5298 (bug 1574475)
Backed out changeset 4a760b3f5d53 (bug 1574475)
Backed out changeset b229b0eea1e7 (bug 1574475)
Backed out changeset 03d34a2f10a6 (bug 1574475)
2021-04-22 18:10:59 +03:00
Valentin Gosu
a6cb0bf452 Bug 1574475 - Stop compiling FTP code r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111245
2021-04-22 13:41:32 +00:00
Peter Van der Beken
302c37978b Bug 1696158 - Move CanSavePresentation to the parent process. Do CanSavePresentation check completely in parent. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D110234
2021-04-19 14:50:56 +00:00
smolnar
84a0543987 Backed out 8 changesets (bug 1696158) for causing multiple failures. CLOSED TREE
Backed out changeset 09c598c8fd29 (bug 1696158)
Backed out changeset 02f956c26901 (bug 1696158)
Backed out changeset b61a3a324cce (bug 1696158)
Backed out changeset 95810ed7f1e5 (bug 1696158)
Backed out changeset 4f93a7b61496 (bug 1696158)
Backed out changeset c80c55b56f2a (bug 1696158)
Backed out changeset 11627c409882 (bug 1696158)
Backed out changeset b98b4316a510 (bug 1696158)
2021-04-19 17:04:08 +03:00
Peter Van der Beken
30c3bd8c7e Bug 1696158 - Move CanSavePresentation to the parent process. Do CanSavePresentation check completely in parent. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D110234
2021-04-19 12:39:20 +00:00
Hubert Boma Manilla
eec8ef34ae Bug 1703786 - Use nsILoadInfo.sandboxFlags instead r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D112154
2021-04-15 11:14:23 +00:00
Christoph Kerschbaumer
e1c35fda94 Bug 1658924: Implement HTTPS-First and automatically fall back to http if secure top-level connection is not available r=necko-reviewers,JulianWels,mattwoodrow,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111686
2021-04-13 17:43:12 +00:00
Emilio Cobos Álvarez
3e0cb7c68b Bug 1703289 - Make mixed content blocker use a session-persistent permission rather than ad-hoc code. r=ckerschb,smaug
This is more fission-compatible, and a lot simpler.

Differential Revision: https://phabricator.services.mozilla.com/D111480
2021-04-12 18:04:12 +00:00
Christoph Kerschbaumer
7544c7f793 Bug 1703520: Remove unused bypassCORSChecks from Loadinfo r=necko-reviewers,robwu,sstreich
Differential Revision: https://phabricator.services.mozilla.com/D111091
2021-04-08 17:51:36 +00:00
Kershaw Chang
19602fcd6c Bug 1698661 - Use the id of top browsing context to dispatch transactions, r=necko-reviewers,kmag,dragana
Differential Revision: https://phabricator.services.mozilla.com/D110219
2021-04-07 07:59:18 +00:00
Tom Tung
a3eac88f3a Bug 1683131 - Fix namespace ambiguity issue on ipc::Endpoint after including nsHttpChannel in imgLoader; r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D108002
2021-03-30 00:52:34 +00:00
Eden Chuang
c7aa9a7c9c Bug 1696111 - Make LoadInfo know if the request is triggered from a media element and if it's an initial request. r=necko-reviewers,alwu,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106890
2021-03-30 00:52:31 +00:00
Butkovits Atila
ad9b1ed9d7 Backed out 12 changesets (bug 1683131, bug 1696111, bug 1695987) for causing crashes(Bug 1701151). a=backout
Backed out changeset 8ffef57e27d2 (bug 1683131)
Backed out changeset c02d5dc72abb (bug 1695987)
Backed out changeset 276f016ddc67 (bug 1683131)
Backed out changeset 2c7a45e20b50 (bug 1683131)
Backed out changeset 11fdb503d537 (bug 1696111)
Backed out changeset 2946eff1e9c8 (bug 1696111)
Backed out changeset e4d01b88e517 (bug 1696111)
Backed out changeset fab7f4cd445d (bug 1696111)
Backed out changeset d60c38f8939a (bug 1696111)
Backed out changeset 3fdc8089a46f (bug 1696111)
Backed out changeset 51a16dfabc98 (bug 1696111)
Backed out changeset 642bdd52fd57 (bug 1696111)
2021-03-26 11:30:28 +02:00
Tom Tung
ec157c9846 Bug 1683131 - Fix namespace ambiguity issue on ipc::Endpoint after including nsHttpChannel in imgLoader; r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D108002
2021-03-25 12:09:42 +00:00
Eden Chuang
908b174731 Bug 1696111 - Make LoadInfo know if the request is triggered from a media element and if it's an initial request. r=necko-reviewers,alwu,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106890
2021-03-25 12:09:40 +00:00
Simon Giesecke
613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Niklas Gögge
ed5eaf624b Bug 1647128 - Detect webby navs caused by meta refreshes in IsUserTriggeredForSecFetchSite check r=necko-reviewers,ckerschb,valentin
Differential Revision: https://phabricator.services.mozilla.com/D108035
2021-03-17 11:42:55 +00:00
Tim Huang
a39ff4c926 Bug 1687283 - Part 1: Add a flag 'needForCheckingAntiTrackingHeuristic' in loadInfo. r=kershaw,necko-reviewers
This patch adds a flag 'needForCheckingAntiTrackingHeuristic' in
loadInfo. This flag will be used for deciding if we need to check the
AntiTracking heuristic after the channel has been classified.

Differential Revision: https://phabricator.services.mozilla.com/D107047
2021-03-12 08:45:29 +00:00
Kris Maglione
ffd58d6ef1 Bug 1697305: Null check top embedder element after running JS. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D107728
2021-03-11 19:21:00 +00:00
Anny Gakhokidze
aa3895af8c Bug 1597427 - Check for recursive subframe loads in the parent process, r=kmag,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D107311
2021-03-11 00:39:37 +00:00
Olli Pettay
a2d036fda6 Bug 1696923 - [SHIP] Update SaveLayoutStateFlag after page load similarly to in-process session history, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D107479
2021-03-09 18:16:58 +00:00
Nika Layzell
af56264610 Bug 1663757 - Part 2: Don't suspend webProgress on process switch, r=annyG,mattwoodrow
Previously, we would need to suspend progress events from the previous
BrowserParent, as otherwise we would receive STATE_STOP progress notifications
from the previous browser when it is destroyed, which would throw off frontend
code. With the new checks added by part 1, we will now catch these cases by
detecting that the current window global has changed, and we can get rid of this
explicit override.

Differential Revision: https://phabricator.services.mozilla.com/D105557
2021-03-09 15:29:40 +00:00