Commit Graph

313 Commits

Author SHA1 Message Date
Simon Giesecke
9364b353d4 Bug 1648010 - Remove NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80631
2020-07-01 08:42:31 +00:00
Simon Giesecke
cd8b8939b9 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
Junior Hsu
58f2c8bc94 Bug 1638513 - P3 strip request body header for preflight, r=valentin,necko-reviewers
(a) Steal nsCORSListenerProxy::UpdateType since the whole usage is removed
    by bug 1312864. Now I'm using it to indicate if the headers should be
	stripped.
(b) Intentionally to let HttpBaseChannel strip the header to save one
    headers copy. It's set via idl, hence I don't think it's moveable.

Differential Revision: https://phabricator.services.mozilla.com/D78831
2020-06-09 18:38:50 +00:00
Junior Hsu
c967db3c67 Bug 1638513 - P2 let nsIHttpChannel implement shouldStripRequestBodyHeader, r=valentin,necko-reviewers
We need to extract the common method into the idl since the connection between necko
and XHR is idl. Need to import the whole necko if we do something like
`#include "HttpBaseChannel.h"

Differential Revision: https://phabricator.services.mozilla.com/D78830
2020-06-09 18:20:15 +00:00
Emilio Cobos Álvarez
54fd961a29 Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin
There's no use case for stateful comparators, so they can be just plain
function pointers.

This is used in some hot places like CSS selector matching.

Differential Revision: https://phabricator.services.mozilla.com/D77084
2020-05-27 18:11:12 +00:00
Chris Peterson
9db7016a65 Bug 1630511 - Replace MOZ_MUST_USE with [[nodiscard]] in netwerk. r=necko-reviewers,dragana
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.

Differential Revision: https://phabricator.services.mozilla.com/D71144
2020-04-18 06:37:32 +00:00
Shane Caraveo
43f7d20087 Bug 1530408 add api on channels to prevent using alt-data cache r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D68892

--HG--
extra : moz-landing-system : lando
2020-04-11 00:18:39 +00:00
Noemi Erli
4d435eafcc Backed out 3 changesets (bug 1530408) for causing xpcshell failures in test_ext_webRequest_filterResponseData.js
Backed out changeset 365c4d5fe9b0 (bug 1530408)
Backed out changeset 77bb11a76b33 (bug 1530408)
Backed out changeset 3c76ac7b3965 (bug 1530408)
2020-04-08 12:04:10 +03:00
Shane Caraveo
397c374f98 Bug 1530408 add api on channels to prevent using alt-data cache r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D68892

--HG--
extra : moz-landing-system : lando
2020-03-31 13:41:00 +00:00
Honza Bambas
cdc702ad46 Bug 1605895 - Add a diagnostic assertion when an http channel on the child process loading CSS does not notify OnStopRequest before being destroyed, r=michal
Differential Revision: https://phabricator.services.mozilla.com/D68025

--HG--
extra : moz-landing-system : lando
2020-04-06 15:12:15 +00:00
Mihai Alexandru Michis
5a2979e8b7 Backed out changeset 30fe730b5ab1 (bug 1605895) for causing mochitest failures in HttpChannelChild
CLOSED TREE
2020-04-02 20:37:12 +03:00
Honza Bambas
994473ee21 Bug 1605895 - Add a diagnostic assertion when an http channel on the child process loading CSS does not notify OnStopRequest before being destroyed, r=michal
Differential Revision: https://phabricator.services.mozilla.com/D68025

--HG--
extra : moz-landing-system : lando
2020-04-02 15:53:54 +00:00
sonakshi
4a48c5d739 Bug 1594432 - Remove aContext from nsIChildChannel.completeRedirectSetup r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D68177

--HG--
extra : moz-landing-system : lando
2020-03-26 11:07:10 +00:00
anjali1903
4018161e48 Bug 1621251 Replace NS_ADDREF(*var = other) with *var = do_AddRef(other).take() in /netwerk r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D66818

--HG--
extra : moz-landing-system : lando
2020-03-17 15:05:26 +00:00
Matt Woodrow
af33d93580 Bug 1612992 - Don't replace the nsIRequest passed to OnStart/StopRequest with nsViewSourceChannel if we don't need it. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D63285

--HG--
extra : moz-landing-system : lando
2020-02-26 22:59:34 +00:00
Honza Bambas
718c54fd9f Bug 1608224 - Update originalURI of the "new" redirect channel used by a view-source channel to let consumers see it has been actually used for view-source, r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60740

--HG--
extra : moz-landing-system : lando
2020-01-29 10:30:09 +00:00
Valentin Gosu
c7d9b630cb Bug 1552176 - Add nsIRequest.set/getTRRMode r=dragana
* Makes it possible to selectively enable TRR for pbmode/container/window/etc

Differential Revision: https://phabricator.services.mozilla.com/D48363

--HG--
extra : moz-landing-system : lando
2020-01-07 20:20:38 +00:00
Matt Woodrow
5913bdc39b Bug 1598523 - Create nsIWrapperChannel so that we can find the inner channel within view-source. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D57893

--HG--
extra : moz-landing-system : lando
2020-01-08 01:00:35 +00:00
Matt Woodrow
ff5ffc1ea3 Bug 1598523 - Implement nsIChildChannel on nsViewSourceChannel forwarding to the inner channel. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D57891

--HG--
extra : moz-landing-system : lando
2020-01-08 01:00:37 +00:00
Matt Woodrow
225eeb216b Bug 1598523 - Improve logging of channel names for DC and view-source. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D57888

--HG--
extra : moz-landing-system : lando
2020-01-08 01:00:41 +00:00
Bogdan Tara
4e368405fa Backed out 6 changesets (bug 1598523) for geckoview failures complaining about NavigationDelegateTest.loadUnknownProtocol
Backed out changeset 2e7ea1ae7fa2 (bug 1598523)
Backed out changeset 6adc1062662b (bug 1598523)
Backed out changeset 141372c43f02 (bug 1598523)
Backed out changeset c5abcaabaf2d (bug 1598523)
Backed out changeset 5a22a20dd993 (bug 1598523)
Backed out changeset e0df103c9cf3 (bug 1598523)
2020-01-08 02:56:18 +02:00
Matt Woodrow
27d2b8a269 Bug 1598523 - Create nsIWrapperChannel so that we can find the inner channel within view-source. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D57893

--HG--
extra : moz-landing-system : lando
2020-01-07 20:57:52 +00:00
Matt Woodrow
a92b542805 Bug 1598523 - Implement nsIChildChannel on nsViewSourceChannel forwarding to the inner channel. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D57891

--HG--
extra : moz-landing-system : lando
2020-01-07 20:57:15 +00:00
Matt Woodrow
e835127601 Bug 1598523 - Improve logging of channel names for DC and view-source. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D57888

--HG--
extra : moz-landing-system : lando
2020-01-07 20:56:02 +00:00
Jean-Yves Avenard
b1be794e1b Bug 1598497 - P1. move canceled attribute to nsIChannel. r=mayhemer
There is no functional change with this commit. The default implementation for GetCanceled() is still to check if the status code is a failure.

However, it can be argued that as you had to call Cancel() on the nsIChannel, having to check the nsIHttpChannelInternal interface to determine if you had been canceled in the past was rather a non obvious path.

It makes more sense to check the nsIChannel interface to determine if it's been canceled already and this allows for finer granularity if needed in the future.

Differential Revision: https://phabricator.services.mozilla.com/D55268

--HG--
extra : moz-landing-system : lando
2019-12-18 21:13:26 +00:00
Noemi Erli
58bf47752e Backed out 2 changesets (bug 1598497) for causing OSX build bustages CLOSED TREE
Backed out changeset 3b31bbf74a5f (bug 1598497)
Backed out changeset 81beebdc2202 (bug 1598497)
2019-12-18 01:54:56 +02:00
Jean-Yves Avenard
c63570cb58 Bug 1598497 - P1. move canceled attribute to nsIChannel. r=mayhemer
There is no functional change with this commit. The default implementation for GetCanceled() is still to check if the status code is a failure.

However, it can be argued that as you had to call Cancel() on the nsIChannel, having to check the nsIHttpChannelInternal interface to determine if you had been canceled in the past was rather a non obvious path.

It makes more sense to check the nsIChannel interface to determine if it's been canceled already and this allows for finer granularity if needed in the future.

Differential Revision: https://phabricator.services.mozilla.com/D55268

--HG--
extra : moz-landing-system : lando
2019-12-17 23:21:46 +00:00
Bogdan Tara
80377e90ee Backed out 6 changesets (bug 1552176) for causing Hazard bustages CLOSED TREE
Backed out changeset c79b90bae420 (bug 1552176)
Backed out changeset 4b970cc771ca (bug 1552176)
Backed out changeset de7aa0eaf4c8 (bug 1552176)
Backed out changeset c8e692a40cd3 (bug 1552176)
Backed out changeset 68882d1eccac (bug 1552176)
Backed out changeset 692e5e51e19e (bug 1552176)
2019-11-11 12:11:36 +02:00
Valentin Gosu
4fe6130ec3 Bug 1552176 - Add nsIRequest.set/getTRRMode r=dragana
* Makes it possible to selectively enable TRR for pbmode/container/window/etc

Differential Revision: https://phabricator.services.mozilla.com/D48363

--HG--
extra : moz-landing-system : lando
2019-11-10 17:11:41 +00:00
Bogdan Tara
8f38f4a3fb Backed out 6 changesets (bug 1552176) for bustages complaining about ServiceWorkerManager.cpp CLOSED TREE
Backed out changeset bff9110e434e (bug 1552176)
Backed out changeset ac8f8a6dbd98 (bug 1552176)
Backed out changeset 8dd630e7534a (bug 1552176)
Backed out changeset 7ce9e220cdb9 (bug 1552176)
Backed out changeset ee9911acfcd4 (bug 1552176)
Backed out changeset 652b3bd6848d (bug 1552176)
2019-11-08 22:18:05 +02:00
Valentin Gosu
adfeaf25f5 Bug 1552176 - Add nsIRequest.set/getTRRMode r=dragana
* Makes it possible to selectively enable TRR for pbmode/container/window/etc

Differential Revision: https://phabricator.services.mozilla.com/D48363

--HG--
extra : moz-landing-system : lando
2019-11-08 17:13:05 +00:00
Noemi Erli
853acdf360 Backed out 5 changesets (bug 1552176) for causing multiple build bustages CLOSED TREE
Backed out changeset 203060e4af95 (bug 1552176)
Backed out changeset b52f0ff800c8 (bug 1552176)
Backed out changeset 9f8d159fe252 (bug 1552176)
Backed out changeset 751b518e08fa (bug 1552176)
Backed out changeset a11ffd474c0c (bug 1552176)
2019-11-02 23:20:28 +02:00
Valentin Gosu
5528771952 Bug 1552176 - Add nsIRequest.set/getTRRMode r=dragana
* Makes it possible to selectively enable TRR for pbmode/container/window/etc

Differential Revision: https://phabricator.services.mozilla.com/D48363

--HG--
extra : moz-landing-system : lando
2019-11-02 20:42:42 +00:00
Junior Hsu
80089f5621 Bug 1545423 - P1 Expose requestSize to nsIHttpChannel r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D50404

--HG--
extra : moz-landing-system : lando
2019-10-31 03:59:36 +00:00
Andreea Pavel
9deb4ea93b Backed out 4 changesets (bug 1545423) for failing test_ext_activityLog.html on a CLOSED TREE
Backed out changeset 0abbf10b68b0 (bug 1545423)
Backed out changeset 35758baf44e3 (bug 1545423)
Backed out changeset 3ae45f3be2e1 (bug 1545423)
Backed out changeset 9f7f0e4c65da (bug 1545423)
2019-10-31 02:16:24 +02:00
Junior Hsu
f12ce60d42 Bug 1545423 - P1 Expose requestSize to nsIHttpChannel r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D50404

--HG--
extra : moz-landing-system : lando
2019-10-30 23:11:30 +00:00
Jean-Yves Avenard
e6d0e7dfda Bug 1588899 - P1. Move classification flags related method to nsIClassifiedChannel. r=Ehsan,baku
This is where it should have been in the first place. Those attributes belong there.

Differential Revision: https://phabricator.services.mozilla.com/D49577

--HG--
extra : moz-landing-system : lando
2019-10-19 04:30:24 +00:00
Junior Hsu
2bf558c130 Bug 1566868 - network error for non empty sandboxing flag and non-null COOP r=valentin
Adjust for new spec change (comment 23)

Differential Revision: https://phabricator.services.mozilla.com/D49222

--HG--
extra : moz-landing-system : lando
2019-10-15 06:09:26 +00:00
Jean-Yves Avenard
9d8eadbabe Bug 1575744 - P6. Remove unused nsIProcessSwitchRequestor implementation. r=mayhemer
nsViewSourceChannel will never trigger a change of process. So we can remove this interface from nsViewSourceChannel.

Differential Revision: https://phabricator.services.mozilla.com/D46160

--HG--
extra : moz-landing-system : lando
2019-09-20 04:09:47 +00:00
Jean-Yves Avenard
4986f63ec2 Bug 1575744 - P2. Add nsIProcessSwitchRequestor interface. r=mayhemer,nika
Will allow for SessionStore.jsm process switching to be used by other objects than nsHttpChannel.

Differential Revision: https://phabricator.services.mozilla.com/D46015

--HG--
extra : moz-landing-system : lando
2019-09-20 04:09:46 +00:00
Bogdan Tara
bee28f01d7 Backed out 8 changesets (bug 1575744) for HttpChannelParent related assertion failures
Backed out changeset af61675dd488 (bug 1575744)
Backed out changeset bf794b9373c8 (bug 1575744)
Backed out changeset 39ffb74d2e12 (bug 1575744)
Backed out changeset c1547b3df672 (bug 1575744)
Backed out changeset 382ee8672027 (bug 1575744)
Backed out changeset 5abb38484f11 (bug 1575744)
Backed out changeset d5244c1bbfe8 (bug 1575744)
Backed out changeset c74b81debf73 (bug 1575744)

--HG--
rename : netwerk/base/nsIProcessSwitchRequestor.idl => netwerk/base/nsICrossProcessSwitchChannel.idl
2019-09-20 06:58:44 +03:00
Jean-Yves Avenard
7018b7cfca Bug 1575744 - P6. Remove unused nsIProcessSwitchRequestor implementation. r=mayhemer
nsViewSourceChannel will never trigger a change of process. So we can remove this interface from nsViewSourceChannel.

Differential Revision: https://phabricator.services.mozilla.com/D46160

--HG--
extra : moz-landing-system : lando
2019-09-18 14:20:23 +00:00
Jean-Yves Avenard
db9dcef811 Bug 1575744 - P2. Add nsIProcessSwitchRequestor interface. r=mayhemer,nika
Will allow for SessionStore.jsm process switching to be used by other objects than nsHttpChannel.

Differential Revision: https://phabricator.services.mozilla.com/D46015

--HG--
extra : moz-landing-system : lando
2019-09-18 23:49:51 +00:00
Jean-Yves Avenard
b43fd91ea2 Bug 1556489 - P11. Add nIIdentChannel interface. r=mayhemer
The devtools listens to http-on-opening-request event which is expected to receive a nsIHttpChannel. However future changes will make it that it's not always a nsIHttpChannel that can fire such event.

As such we create an intermediary interface nsIIdentChannel and move the subset generating such event in nsIHttpChannel there.

Differential Revision: https://phabricator.services.mozilla.com/D40968
2019-09-03 10:19:34 +10:00
Christoph Kerschbaumer
554015cccb Bug 1404367: Pass LoadInfo of channel to nsViewSourceChannel::Init. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D42296

--HG--
extra : moz-landing-system : lando
2019-08-16 11:35:57 +00:00
Valentin Gosu
2cd34ccec7 Bug 1555036 - If there is a Cross-Origin-Opener-Policy mismatch and the SANDBOXED_AUXILIARY_NAVIGATION is set navigate to a network error r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D34420

--HG--
extra : moz-landing-system : lando
2019-06-14 21:48:51 +00:00
Valentin Gosu
b8bdfab7c9 Bug 1536744 - Remove nsIProtocolHandler.newURI r=baku
Differential Revision: https://phabricator.services.mozilla.com/D30703

--HG--
extra : moz-landing-system : lando
2019-05-28 13:49:27 +00:00
Valentin Gosu
8ce8ef49f6 Bug 1536744 - Add {nsAboutProtocolHandler,nsViewSourceHandler,SubstitutingProtocolHandler}::CreateNewURI() static methods r=baku
Differential Revision: https://phabricator.services.mozilla.com/D30697

--HG--
extra : moz-landing-system : lando
2019-05-28 13:48:49 +00:00
Thomas Nguyen
23e61a2595 Bug 1532318 - part 1: use ReferrerInfo class in nsIHttpChannel instead of referrer and referrer policy r=valentin,ckerschb,michal
Differential Revision: https://phabricator.services.mozilla.com/D22783

--HG--
extra : moz-landing-system : lando
2019-05-02 12:34:52 +00:00
Sylvestre Ledru
e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

Differential Revision: https://phabricator.services.mozilla.com/D28956

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00