Commit Graph

7004 Commits

Author SHA1 Message Date
Ehsan Akhgari
645a5d3db1 Bug 1489916 - Remove the XPCOM component registration for nsHttpChannelAuthProvider; r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D5390
2018-09-10 08:01:37 -04:00
Valentin Gosu
d3db9b2ceb Bug 1489730 - Allow base64 token to be followed by space r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D5378

--HG--
extra : moz-landing-system : lando
2018-09-10 06:24:20 +00:00
Csoregi Natalia
0400fe7b57 Backed out changeset bd8baf88f373 (bug 1468222) for test_security-info-parser.js failures. CLOSED TREE 2018-09-08 03:16:25 +03:00
Dipen Patel
0679e09a9a Bug 1468222 Consolidate nsISSLStatus info nsITransportSecurityInfo r=snorp,ato,sfraser,keeler,baku,mcmanus,Gijs
Move all fields of nsISSLStatus to nsITransportSecurityProvider
Remove nsISSLStatus interface and definition
Update all code and test references to nsISSLStatus
Maintain ability to read in older version of serialized nsISSLStatus.  This
is verified with psm_DeserializeCert gtest.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 22:50:17 +00:00
Sylvestre Ledru
aa37bde79b Bug 1489454 - Remove all trailing whitespaces (again) r=Ehsan
This also includes moving some files to the regular format.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 14:47:51 +00:00
Valentin Gosu
b39f149d13 Bug 908413 - Use dom::CMimeType::Parse to extract content type for data URIs r=hsivonen
Depends on D5094

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

--HG--
extra : moz-landing-system : lando
2018-09-07 05:44:49 +00:00
Nicholas Hurley
dc19891fc2 Bug 1485019 - Don't Truncate() a pre-allocated decompression buffer. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D5044

--HG--
extra : moz-landing-system : lando
2018-09-06 21:05:03 +00:00
Valentin Gosu
4c346828a4 Bug 1481084 - Assertion OnSocketThread() in HttpBackgroundChannelChild::RecvOnStopRequest during shutdown r=dragana
OnSocketTread doesn't work properly during shutdown because nsSocketTransportService2.cpp::gSocketThread is null.
We call gSocketTransportService->IsOnCurrentThreadInfallible() instead, just like we already do in HttpBackgroundChannelChild::ActorDestroy()

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

--HG--
extra : moz-landing-system : lando
2018-09-06 21:03:10 +00:00
Valentin Gosu
a2675e9878 Bug 1476996 - Implement cross process redirection in Http on the parent process r=bagder,nika
This patch builds the foundation for the ability to relocate HTTP channels from one content process to another in order to ensure that origins are properly isolated. This relocation would normally occur when the response to an HTTP request is a redirect to a different origin.
The patch merely adds the mechanism for relocating the channel, rather than the logic of doing so. This will be provided in a follow-up patch by a specialized service. Right now that functionality is mocked in the test.

How this works:
In nsHttpChannel::OnStartRequest we will query the service that decides whether we need to direct the response to another process. If so, it will return a promise that resolves to a TabParent.
When the promise resolves, in HttpChannelParentListener::TriggerCrossProcessRedirect we call NeckoParent::SendCrossProcessRedirect passing along the required information to recreate the channel in the new process. The NeckoChild in the new process will then instantiate a new channel, call ConnectParent() which creates the associated parent channel, and connects it with the existing nsHttpChannel.
A listener in the new process is then notified of the existence of the new channel. It is required to call completeRedirectSetup on the channel, passing an nsIStreamListener to the call.
We then finish the entire operation with a call to HttpChannelChild::SendCrossProcessRedirectDone which causes us to close the old HttpChannelChild in the previous process and to resume the nsHttpChannel in the main process.

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

--HG--
rename : netwerk/test/browser/browser_cookie_sync_across_tabs.js => netwerk/test/browser/browser_cross_process_redirect.js
rename : dom/media/test/redirect.sjs => netwerk/test/browser/redirect.sjs
extra : moz-landing-system : lando
2018-09-04 20:45:22 +00:00
Gurzau Raul
dfbefcc19f Backed out changeset 45605798ecfe (bug 1476996) for build bustage at netwerk/protocol/http/HttpChannelParentListener.cpp on a CLOSED TREE 2018-09-04 20:31:33 +03:00
Valentin Gosu
98ff61cc44 Bug 1476996 - Implement cross process redirection in Http on the parent process r=bagder,nika
This patch builds the foundation for the ability to relocate HTTP channels from one content process to another in order to ensure that origins are properly isolated. This relocation would normally occur when the response to an HTTP request is a redirect to a different origin.
The patch merely adds the mechanism for relocating the channel, rather than the logic of doing so. This will be provided in a follow-up patch by a specialized service. Right now that functionality is mocked in the test.

How this works:
In nsHttpChannel::OnStartRequest we will query the service that decides whether we need to direct the response to another process. If so, it will return a promise that resolves to a TabParent.
When the promise resolves, in HttpChannelParentListener::TriggerCrossProcessRedirect we call NeckoParent::SendCrossProcessRedirect passing along the required information to recreate the channel in the new process. The NeckoChild in the new process will then instantiate a new channel, call ConnectParent() which creates the associated parent channel, and connects it with the existing nsHttpChannel.
A listener in the new process is then notified of the existence of the new channel. It is required to call completeRedirectSetup on the channel, passing an nsIStreamListener to the call.
We then finish the entire operation with a call to HttpChannelChild::SendCrossProcessRedirectDone which causes us to close the old HttpChannelChild in the previous process and to resume the nsHttpChannel in the main process.

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

--HG--
rename : netwerk/test/browser/browser_cookie_sync_across_tabs.js => netwerk/test/browser/browser_cross_process_redirect.js
rename : dom/media/test/redirect.sjs => netwerk/test/browser/redirect.sjs
extra : moz-landing-system : lando
2018-09-04 16:40:57 +00:00
Ehsan Akhgari
92bbdcda2d Bug 1488238 - Remove the XPCOM component registration for nsApplicationCache; r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D4878
2018-09-03 14:01:03 -04:00
Sebastian Hengst
973b725f51 Bug 1485400 - Remove ')' from merge conflict. a=bustage-fix 2018-09-01 01:56:12 +03:00
Ciure Andrei
d1376bd7ec Merge inbound to mozilla-central. a=merge 2018-09-01 01:40:48 +03:00
Coroiu Cristina
83cdfe7284 Merge mozilla-central to inbound a=merge on a CLOSED TREE 2018-08-31 19:35:06 +03:00
Coroiu Cristina
43969de34f Merge inbound to mozilla-central a=merge 2018-08-31 19:14:43 +03:00
Andrea Marchesini
155c458ccc Bug 1487390 - Notify when a channel is aborted because of fastblocking, r=ehsan 2018-08-31 11:02:33 +02:00
Andrea Marchesini
40a8c122d3 Bug 1487331 - STATE_BLOCKED_TRACKING_COOKIES must tell why cookies are blocked, r=ehsan
Introduce these new blocking state values:

const unsigned long STATE_COOKIES_BLOCKED_BY_PERMISSION = 0x10000000;
const unsigned long STATE_COOKIES_BLOCKED_TRACKER       = 0x20000000;
const unsigned long STATE_COOKIES_BLOCKED_ALL           = 0x40000000;
const unsigned long STATE_COOKIES_BLOCKED_FOREIGN       = 0x80000000;
2018-08-31 11:02:33 +02:00
Coroiu Cristina
71432717b8 Merge mozilla-central to autoland a=merge on a CLOSED TREE 2018-08-31 19:18:33 +03:00
Liang-Heng Chen
7206b4243b Bug 1485400 - Part 1: fix tracker found/blocked counter; r=mayhemer
make counter increased when trackers are found

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

--HG--
extra : rebase_source : 90da79fbb83271b2f7a8460ebd02aa2abb635305
extra : source : c476aa79a8ca991dc8ea1e5c2eab98e442dad406
2018-08-31 15:13:30 +00:00
Coroiu Cristina
437a1f4445 Backed out 2 changesets (bug 1485400) for build bustage at build/src/netwerk/base/nsChannelClassifier.cpp on a CLOSED TREE
Backed out changeset c476aa79a8ca (bug 1485400)
Backed out changeset 9370432b26ad (bug 1485400)
2018-08-31 18:57:58 +03:00
Liang-Heng Chen
64e65f4ec9 Bug 1485400 - Part 1: fix tracker found/blocked counter; r=mayhemer
make counter increased when trackers are found

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

--HG--
extra : moz-landing-system : lando
2018-08-31 15:13:30 +00:00
Daniel Stenberg
7f94897d33 bug 1487432 - make LOAD_DISABLE_TRR enforce a different hashkey r=valentin
so that such requests don't inadvertently reuse connections done that
might have used TRR.

MozReview-Commit-ID: 2bO4VCGSgOO

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

--HG--
extra : moz-landing-system : lando
2018-08-31 07:03:16 +00:00
Andrea Marchesini
24005dab5f Bug 1485492 - Disable fastblocking when the user has interacted with a document, r=ehsan 2018-08-31 13:21:17 +02:00
Andrea Marchesini
45cfa7f75c Bug 1487093 - Propagate cookie blocking notification to child nsIChannel, r=ehsan, r=valentin 2018-08-30 17:44:39 +02:00
Cosmin Sabou
2731d11658 Merge mozilla-central to inbound. a=merge 2018-10-04 02:40:08 +03:00
Honza Bambas
b730d24d2e yBug 1423278 - Correctly instantiate proxy authenticator with a lowercase schema, r=jduell
--HG--
extra : rebase_source : 7b64c728e296db8242cde7dff57aa60b903dc29d
2018-08-29 14:04:00 +03:00
Henri Sivonen
f725924171 Bug 1485943 - Avoid writing past the logical length of a string in AlternateServices.cpp. r=dragana
MozReview-Commit-ID: 4xPYaAbGaEI

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

--HG--
extra : moz-landing-system : lando
2018-08-29 08:39:42 +00:00
Ciure Andrei
d716a04e20 Merge inbound to mozilla-central. a=merge 2018-08-29 00:58:21 +03:00
Nicholas Hurley
dd1853e164 Bug 1483294 - Always advertise h2 if TLS 1.3 is being offered. r=dragana
Previously (under TLS 1.2), we would avoid advertising h2 support if the
spec-mandatory suite was disabled. That suite is only required for TLS
1.2, though. We would like to offer h2 in more cases, so only check for
the mandatory suite if someone has turned off TLS 1.3.

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

--HG--
extra : moz-landing-system : lando
2018-08-27 18:56:44 +00:00
Henri Sivonen
cbab098175 Bug 1485343 - Avoid locale-dependent C standard library functions in FTP code. r=valentin
MozReview-Commit-ID: CXcluPKLwIv

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

--HG--
extra : moz-landing-system : lando
2018-08-27 09:11:30 +00:00
arthur.iakab
5527acb8d8 Merge inbound to mozilla-central a=merge 2018-08-25 01:08:22 +03:00
Henri Sivonen
b1e7ee63f3 Bug 1485945 - Set the length instead of capacity of an address string to avoid writing past its logical length. r=valentin
MozReview-Commit-ID: 5anNIW843JJ

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

--HG--
extra : moz-landing-system : lando
2018-08-24 14:05:13 +00:00
Ehsan Akhgari
9172f9d616 Bug 1485494 - Remove the XPCOM registration for RedirectChannelRegistrar; r=mayhemer 2018-08-24 13:04:10 -04:00
Ehsan Akhgari
50793958bf Bug 1485532 - Part 2: Make sure that tracking requests that webRequest.onBeforeRequest handlers do not handle will still get blocked by tracking protection; r=mayhemer 2018-08-24 11:23:10 -04:00
Ehsan Akhgari
5306437473 Bug 1485673 - Allow tracking channels being redirected from http-on-modify-request observer notifications when tracking protection is turned on; r=mayhemer 2018-08-24 11:23:09 -04:00
Tiberius Oros
2ee9341d01 Merge inbound to mozilla-central. a=merge 2018-08-24 12:43:45 +03:00
Daniel Stenberg
9eb175b4cb bug 1470853 - Add Telemetry::DNS_TRR_REQUEST_PER_CONN r=nwgh
Count number of requests/streams per connection done when the connection
was used for TRR.

MozReview-Commit-ID: 50NVSCcd6jy

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

--HG--
extra : moz-landing-system : lando
2018-08-23 18:13:34 +00:00
Ehsan Akhgari
3efae05d6c Bug 1485427 - Add two assertions ensuring that request observers are (not) fired at the right times; r=mayhemer 2018-08-23 22:59:32 -04:00
Cosmin Sabou
d141575366 Merge mozilla-central to mozilla-inbound. a=merge 2018-08-27 19:00:38 +03:00
Ehsan Akhgari
2d62042b5c Bug 1486092 - Part 1: Move the browser.contentblocking.enabled pref to StaticPrefs; r=baku 2018-08-27 09:22:01 -04:00
Ehsan Akhgari
3788f265e3 Bug 1485182 - Part 1: Run http-on-modify-request observers when tracking protection cancels an HTTP channel; r=mayhemer 2018-08-22 14:00:01 -04:00
Henri Sivonen
57d5f3ee13 Bug 1484984 - Avoid writing past the logical length of a string in networking code. r=valentin
MozReview-Commit-ID: IIffoxnF6KS

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

--HG--
extra : moz-landing-system : lando
2018-08-21 14:20:48 +00:00
Daniel Stenberg
8225a95bbd bug 1483311 - add LOAD_DISABLE_TRR as a loadflag r=mcmanus
Disable TRR at will without needing to toggle the pref.

MozReview-Commit-ID: 1Ept6kDrjN3

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

--HG--
extra : moz-landing-system : lando
2018-08-20 22:02:04 +00:00
Francois Marier
309a23afc3 Bug 1482950 - Use the correct 3rdparty check in tracking annotations. r=dimi,Ehsan,mayhemer!,ehsan!
The mIsTrackingResource flag on nsIHttpChannel was split into two separate
flags depending on whether or not the resource is third-party. The correct
flag will be set by the channel classifier. Similarly, a new function was
introduced, GetIsThirdPartyTrackingResource(), for those consumers (like TP)
who only care about third-party trackers.

The existing function, GetIsTracking(), will continue to look at both
first-party and third-party trackers (the behavior since first party
tracking was added to annotations in bug 1476324).

The OverrideTrackingResource() function now allows nsHTMLDocument to
override both mIsFirstPartyTrackingResource and
mIsThirdPartyTrackingResource, but since this function is a little dangerous
and only has a single user, I added an assert to make future callers think
twice about using it to opt out of tracking annotations.

Currently, only the default storage restrictions need to look at first-party
trackers so every other consumer has been moved to
mIsThirdPartyTrackingResource or GetIsThirdPartyTrackingResource().

This effectively reverts the third-party checks added in bug 1476715 and
replaces them with the more complicated check that was added in bug 1108017.
It follows the approach that Ehsan initially suggested in bug 1476715. It
also reverts the changes in the expected values of the tracking annotation
test since these were, in hindsight, a warning about this regression.

Depends on D3722

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

--HG--
extra : moz-landing-system : lando
2018-08-20 23:53:45 +00:00
Francois Marier
e2c011dd88 Bug 1482950 - Backed out changeset 32d94a3cc7af. r=xeonchen!
This refactoring is now unnecessary since the third-party check
is getting removed.

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

--HG--
extra : moz-landing-system : lando
2018-08-19 09:00:44 +00:00
Brindusan Cristian
edd591c4d4 Backed out changeset 89117b6b5799 (bug 1470853) for xpcshell failures on dom/push/test/xpcshell/test_notification_http2.js. CLOSED TREE 2018-08-20 19:20:20 +03:00
Daniel Stenberg
70b6a3456b bug 1470853 - Add Telemetry::DNS_TRR_REQUEST_PER_CONN r=nwgh
Count number of requests/streams per connection done when the connection
was used for TRR.

MozReview-Commit-ID: H7X06h8gVZY

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

--HG--
extra : moz-landing-system : lando
2018-08-20 15:11:14 +00:00
Liang-Heng Chen
6c9d7c21d6 Bug 1481252 - Part 1: Report FastBlock status to docshell; r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D3024

--HG--
extra : moz-landing-system : lando
2018-08-16 15:29:22 +00:00
Liang-Heng Chen
a0692d51f7 Bug 1482117 - Part 2: cache the result of IsThirdPartyChannel; r=mayhemer
cache the result to speed up

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

--HG--
extra : moz-landing-system : lando
2018-08-17 12:43:51 +00:00
Liang-Heng Chen
837bec1102 Bug 1482117 - Part 1: Make FastBlock happen after tailing; r=mayhemer
move the FastBlock checking block to |TriggerNetwork|

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

--HG--
extra : moz-landing-system : lando
2018-08-15 16:32:34 +00:00
Margareta Eliza Balazs
48299c8cd6 Merge inbound to mozilla-central. a=merge 2018-08-16 12:24:26 +03:00
Junior Hsu
13e7f90bb3 Bug 1280629 - Part 2: telemetry of e10 back pressure suspension rate r=dragana
Split this patch for data review

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

--HG--
extra : moz-landing-system : lando
2018-08-15 22:36:42 +00:00
Junior Hsu
4cd0359acf Bug 1280629 - Part 1: Suspend the http channel if the child process is not able to consume on time r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D2745

--HG--
extra : moz-landing-system : lando
2018-08-15 22:35:58 +00:00
Diego Pino Garcia
6895fb936e Bug 1405022 - Remove unnecessary use of nsAutoCString from the call to NS_NewURI in nsViewSourceChannel::BuildViewSourceURI. r=mayhemer 2018-08-15 09:02:00 -04:00
Narcis Beleuzu
2c112fd0ac Backed out 2 changesets (bug 1280629) for wpt failures on media-elements/video_008.htm
Backed out changeset 64648fd6ef5e (bug 1280629)
Backed out changeset e654f2b128f6 (bug 1280629)
2018-08-15 19:44:37 +03:00
Junior Hsu
b434505847 Bug 1280629 - Part 2: telemetry of e10 back pressure suspension rate. r=dragana
Summary: Split this patch for data review

Reviewers: dragana

Reviewed By: dragana

Subscribers: janerik

Bug #: 1280629

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

--HG--
extra : amend_source : 16f0ab9d1f12f7e299d1339e3c1ca3023ea8502b
2018-08-15 10:07:04 +03:00
Junior Hsu
c45d80770b Bug 1280629 - Part 1: Suspend the http channel if the child process is not able to consume on time. r=dragana
Reviewers: dragana

Reviewed By: dragana

Subscribers: reviewbot

Bug #: 1280629

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

--HG--
extra : rebase_source : d031d3dcd945e1e479a121c06e5ee0b7dfd75ea9
extra : amend_source : 36f5d5dfb1b6bc29920a8e72f1105def472607fa
2018-08-15 10:04:50 +03:00
Henri Sivonen
3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Ehsan Akhgari
c64a283779 Bug 1482999 - Use the final channel URI for top-level document loads when determining the unique cache storage space identifier; r=valentin
In some cases, such as for channels which have been opened from the parent
process, the top window URI isn't available.  For such channels, the code
before this change would fail to compute the top window origin.
2018-08-13 18:22:13 -04:00
Daniel Varga
9355025fd5 Merge mozilla-central to mozilla-inbound 2018-08-14 01:09:48 +03:00
Francois Marier
66260f4d22 Bug 1480448 - Honor browser.contentblocking.enabled in Fastblock. r=xeonchen!
Differential Revision: https://phabricator.services.mozilla.com/D3135

--HG--
extra : moz-landing-system : lando
2018-08-13 10:06:37 +00:00
Ehsan Akhgari
9ab3b9fea9 Bug 1478539 - Part 3: Remove some dead code; r=nwgh 2018-08-13 17:05:31 -04:00
Ehsan Akhgari
8f79c3cc07 Bug 1478539 - Part 1: Add the Cookie header to HTTP requests only after a potential classification has been completed on the channel to ensure the tracking state is up to date; r=nwgh
Besides this, we also need to do two extra things here:

  * Call the http-on-modify-request observers after the Cookie header is set,
    to ensure the Cookie header will be visible to them.
  * Move the call to SetLoadGroupUserAgentOverride() to happen after that, in
    order to preserve the existing respective ordering of that with regards to
    when the http-on-modify-request observers run.

Please note that as things are right now, the http-on-modify-request observers
are unable to see the User-Agent header overrides through the loadgroup, which
seems suboptimal, but this patch aims to preserve the existing behavior of
these observers.
2018-08-13 17:04:44 -04:00
Andrea Marchesini
d1e5833a37 Bug 1480780 - Merge the privacy.3rdpartystorage.enabled pref with the network.cookie.cookieBehavior pref; r=ehsan
This patch introduces a new cookie behavior policy called
BEHAVIOR_REJECT_TRACKER.  It also makes it possible to override that
behavior with cookie permissions similar to other cookie behaviors.
2018-08-13 16:01:16 -04:00
Ehsan Akhgari
7d314b5011 Bug 1482129 - Exempt stylesheets, fonts and images when canceling loading of slow HTTP requests of tracking resources; r=valentin 2018-08-09 14:03:10 -04:00
Mike Hommey
01f69bda76 Bug 1481373 - Work around clang miscompilation of a non-virtual thunk to HttpChannelChild::AsyncCall on x86. r=valentin 2018-08-08 06:31:40 +09:00
Kershaw Chang
2e30d83ba2 Bug 1470458 - Use correct function to copy UTF8 string, r=valentin
Since username and password are not always ascii string, we have to use the correct function CopyUTF8toUTF16 to copy string.
2018-08-07 06:00:00 +03:00
Arthur Edelstein
04dab89db7 Bug 1481096 - Fix incorrectly written pref name r=nwgh
"spdy.default-hpack-buffer" was incorrectly
written as "spdy.hpack-default-buffer".

--HG--
extra : histedit_source : 28dfa00e0accb4e51239a2d31178944034b3eaf5
2018-08-05 16:10:00 +03:00
Masatoshi Kimura
3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Andrea Marchesini
d7df3bf81e Bug 1476715 - low priority connection for 3rd party + tracking resource only, r=francois 2018-08-06 13:42:43 +02:00
Franziskus Kiefer
a52a8495f9 Bug 1479787 - use NSS mozpkix in Firefox, r=mt,keeler,glandium
Differential Revision: https://phabricator.services.mozilla.com/D2725
Differential Revision: https://phabricator.services.mozilla.com/D2860

--HG--
extra : rebase_source : 189c13c2a3104c106fcabad5998af6cb2e20d4a5
2018-10-02 14:59:34 +02:00
Andrea Marchesini
8ab9f07dd8 Bug 1462879 - PerformanceNavigationTiming must be notified correctly - part 1 - notify, r=smaug, r=valentin 2018-08-04 08:54:58 +02:00
Cosmin Sabou
de8c2bd891 Backed out changeset 5950c9d63c3b (bug 1090497) for build bustages on several files. CLOSED TREE 2018-08-02 19:59:53 +03:00
Masatoshi Kimura
feea19030c Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : a62521fdc66def4e4d5d7bf52e68365a786b5c55
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Nicholas Hurley
e8cb6c18a3 Bug 1468583 - Explicitly tie h2stream to transaction in logs for logan. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D1656

--HG--
extra : moz-landing-system : lando
2018-07-27 06:35:00 +00:00
Felipe Gomes
25e4f07d6c Bug 1470324 - Don't load enterprise policies in the content during startup. r=kmag
With this patch, EnterprisePoliciesContent.js will only be loaded whenever a check for isAllowed happens in content.

This patch also adds shortcuts to make sure that checks for about:blank, about:neterror and about:certerror are skipped

MozReview-Commit-ID: AdMrolJqouN

--HG--
extra : rebase_source : 0949427c78fe26743294c0c1b43844f0154003b7
2018-07-27 14:50:55 -03:00
Michal Novotny
6c7074966b Bug 1477684 - rcwn blocking some xmlHttpRequests, r=valentin
Remove conditional and byte range headers when network won the race for case we send the request again due to 401 response.
2018-07-26 07:20:00 +03:00
Dorel Luca
57b8025529 Backed out changeset 3ff805a9631e (bug 1475701) for XPCshell failures on netwerk/test/unit/test_cache2-29a-concurrent_read_resumable_entry_size_zero.js 2018-07-27 12:12:59 +03:00
Michal Novotny
38f29ba537 Bug 1475701 - Save Page As doesn't begin MP3 download while tab is open, r=valentin
We need to close the cache entry if opening output stream for writing/appending data failed, so the entry isn't blocked for other requests.
2018-07-26 14:54:00 +03:00
Eric Rahm
c8e70cc096 Bug 1240547 - Part 5: Reorder HttpBaseChannel member variables. r=valentin
--HG--
extra : rebase_source : af73138c747517bb82658a4a1e9f3cf357db2f91
2018-07-20 16:56:22 -07:00
Eric Rahm
34bd603e7b Bug 1240547 - Part 4: Use bitfields for HttpChannelChild bool variables. r=valentin
--HG--
extra : rebase_source : aaba4d19c433485a711bdabb2907984163bb4ed0
2018-07-20 15:39:40 -07:00
Eric Rahm
4fa3e432dd Bug 1240547 - Part 3: Reorder HttpChannelChild member variables. r=valentin
--HG--
extra : rebase_source : f1c33e1b77f9ce0fd70838ed27331c8490163774
2018-07-20 14:11:46 -07:00
Eric Rahm
a388fe4b0c Bug 1240547 - Part 2: Pack HttpChannelParent bool fields. r=valentin
--HG--
extra : rebase_source : 459cb63075b9a328d70c23b30cc9ca76a4a58162
2018-07-19 17:40:43 -07:00
Eric Rahm
bcf9fc80b0 Bug 1240547 - Part 1: Reorder HttpChannelParent member variables. r=valentin
--HG--
extra : rebase_source : 2e60ea6d39d4e2717edd68e4abd1f06acf8bc7d4
2018-07-19 17:19:07 -07:00
Dipen Patel
7641beb1f8 Bug 1475647 - Remove nsISSLStatusProvider interface. r=baku,Gijs,jchen,jryans,keeler,mcmanus
- Access nsISSLStatus directly as a member of nsITransportSecurityInfo
and nsISecureBrowserUI.  This is part of a larger effort to consolidate
nsISSLStatus and nsITransportSecurityInfo.
- The TabParent implementation of GetSecInfo will always return null.
- Removed unnecessary QueryInterface calls
- Style adherence updates

MozReview-Commit-ID: Dzy6t2zYljL

--HG--
extra : rebase_source : 9c400bed3c9d29a186fc987c9bd0ffceb37bfd94
2018-07-13 11:48:55 -07:00
Andreea Pavel
d0f6470c17 Backed out changeset c235d6f86c22 (bug 1475647) for breaking firefox ui at testing/firefox-ui/tests/puppeteer/test_tabbar.py on a CLOSED TREE 2018-07-25 19:34:58 +03:00
Dipen Patel
8670057dd5 Bug 1475647 - Remove nsISSLStatusProvider interface. r=baku,Gijs,jchen,jryans,keeler,mcmanus
- Access nsISSLStatus directly as a member of nsITransportSecurityInfo
and nsISecureBrowserUI.  This is part of a larger effort to consolidate
nsISSLStatus and nsITransportSecurityInfo.
- The TabParent implementation of GetSecInfo will always return null.
- Removed unnecessary QueryInterface calls
- Style adherence updates

MozReview-Commit-ID: Dzy6t2zYljL

--HG--
extra : rebase_source : fbfbcf7608efbfb35c9be4018ff0f4e70b2768d2
2018-07-13 11:48:55 -07:00
Tiberius Oros
036999d0a9 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-25 13:43:03 +03:00
Liang-Heng Chen
5574f1d788 Bug 1478081 - avoid accessing null pointer; r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D2336

--HG--
extra : moz-landing-system : lando
2018-07-24 21:03:03 +00:00
Boris Zbarsky
634a492dda Bug 1476145 part 9. Drop support for getting window utils via getInterface. r=nika 2018-07-24 19:47:43 -04:00
Michal Novotny
352af354ca Bug 1466577 - Race condition in WebSocketChannel::StopSession. r=hurley
This patch prevents calling WebSocketChannel::StopSession at the same time on main thread from WebSocketChannel::Close and on socket thread from WebSocketChannel::AbortSession.

--HG--
extra : amend_source : ee9c2ebb75273251d868c9726597a41cf38fbb6c
2018-07-24 17:18:58 -04:00
Liang-Heng Chen
0e974b3af4 Bug 1474280 - Part 2: carry timestamp when redirects; r=valentin 2018-07-23 05:29:00 +03:00
Liang-Heng Chen
a1785d29f1 Bug 1474280 - Part 1: Cancel timed-out trackers; r=mayhemer 2018-07-23 05:28:00 +03:00
Valentin Gosu
7937c7c4cc Bug 1476928 - Remove nsIURI.CloneIgnoringRef and nsIURI.CloneWithNewRef r=JuniorHsu
The patch introduces NS_GetURIWithNewRef and NS_GetURIWithNewRef which perform the same function.

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

--HG--
extra : moz-landing-system : lando
2018-07-23 11:28:47 +00:00
Christoph Kerschbaumer
f9100f4600 Bug 1475073: Pass individual CORS errors as categories to web console error messages. r=baku 2018-07-20 19:57:41 +02:00
Andreea Pavel
b5a482c899 Backed out 3 changesets (bug 1475073, bug 1304645, bug 1474537) for failing wpt and mochitest on a CLOSED TREE
Backed out changeset 4fbeea69b10d (bug 1475073)
Backed out changeset d3ac68d9ead9 (bug 1304645)
Backed out changeset 113b601a3b59 (bug 1474537)
2018-07-20 14:00:09 +03:00
Christoph Kerschbaumer
c1c9ee3d96 Bug 1475073: Pass individual CORS errors as categories to web console error messages. r=baku 2018-07-20 10:47:15 +02:00
Andrea Marchesini
a053cf1c15 Bug 1476306 - Moving NullPrincipal/ContentPrincipal/SystemPrincipal under mozilla namespace - part 1 - NullPrincipal, r=ckerschb 2018-07-17 21:37:48 +02:00
Kris Maglione
37b1a59b2a Bug 1473631: Part 1 - Replace pref observers with callbacks in nsHttpHandler. r=njn
MozReview-Commit-ID: LtWV0yEwSd6

--HG--
extra : rebase_source : d839e8436ae97932d448d725ff70b0bb2a22d786
2018-07-05 13:10:20 -07:00
Patrick McManus
689f7724db Bug 1475420 - mark the TRR connection as DISABLE_TRR to avoid TXT deadlock r=valentin
MozReview-Commit-ID: 3xF3Hb5rpyh

--HG--
extra : rebase_source : 732e5c440321b8cd6bf9b189c5f97774ae338051
2018-07-12 17:48:54 -04:00
Gurzau Raul
fff6ccd0b0 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-07-12 01:08:09 +03:00
Dragana Damjanovic
66dc0d2b39 Bug 1467102 - Fix the ftp diversion. r=bagder 2018-07-11 10:01:43 -04:00
imjching
01b7c92eb4 Bug 1416066 - Add a new flag to nsIAboutModule to load URIs in privileged content processes if feature is enabled. r=mconley
We will apply the URI_CAN_LOAD_IN_PRIVILEGED_CHILD flag to Activity Stream about: pages instead of hardcoding the URLs in a Set.

MozReview-Commit-ID: F6AGmsKs1SR

--HG--
extra : rebase_source : e0435776b7bd390a2a62190ba6c72d4d312538d1
2018-07-03 19:31:37 -04:00
vinoth
33326b442d Bug 1312864 - Allow redirects for requests that require preflight
Reviewers: ckerschb, mrbkap

Reviewed By: ckerschb, mrbkap

Subscribers: ckerschb

Bug #: 1312864

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

--HG--
extra : rebase_source : 06ae50d91816955ab6bdaa2741ddccb1eb2a3206
2018-07-10 15:48:03 +03:00
Daniel Stenberg
9cdf207464 bug 1473333 - add Telemetry probe HTTP_CHANNEL_ONSTART_SUCCESS r=mcmanus
Measure success rate in nsHttpChannel::OnStartRequest

MozReview-Commit-ID: Ia8h8acIvSA
2018-07-08 23:02:00 +03:00
vinoth
a3ef79c1d0 Bug 1471502 - Misleading console error message fixed r=ckerschb
Reviewers: ckerschb

Reviewed By: ckerschb

Subscribers: ckerschb, Pike, flod

Bug #: 1471502

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

--HG--
extra : rebase_source : 717404c6661192cec34c85e93354bc59165cc2f8
extra : amend_source : 3aad1b8a31e97accdd7d994e0cdc1c5bfa385996
2018-07-08 02:16:12 +03:00
Dragana Damjanovic
c73d6a6cda Bug 1453204 - Fix 425 return code for websocket. r=michal
--HG--
extra : rebase_source : 7455df696dd97cf3b457edf6d227128432bce04a
2018-06-29 09:10:00 +03:00
Michal Novotny
54b4934a24 Bug 756165 - Return close code 1015 to JS when TLS setup fails, r=baku, r=valentin
We cannot simply pass the status code using nsIWebSocketListener::OnServerClose because it's called only when the connection is established. Instead, I'm passing TLS failure from http channel to nsIWebSocketListener::OnStop where the correct status code is set.
2018-06-28 07:54:00 +03:00
David Keeler
9b69a30991 bug 1470030 - convert manually-written nsINSSComponent definition to idl r=fkiefer
Defining nsINSSComponent in idl rather than manually in a header file allows us
to make full use of the machinery that already exists to process and generate
the correct definitions. Furthermore, it enables us to define JS-accessible APIs
on nsINSSComponent, which enables us to build frontend features that can work
directly with the data and functionality the underlying implementation has
access to.

MozReview-Commit-ID: JFI9s12wmRE

--HG--
extra : rebase_source : 16b660e37db681c8823cbb6b7ff59dd0d35f7e73
2018-06-20 16:43:18 -07:00
Chris Peterson
2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Andrea Marchesini
99fa4c908a Bug 1470578 - Rename the anti-tracking pref, r=francois 2018-06-25 22:46:13 +02:00
Ben Kelly
06ae64dde8 Bug 1470286 Propagate channel creation and async open time across internal redirects. r=valentin 2018-06-23 10:10:10 -07:00
Petr Sumbera
700965b040 Bug 1452130 - nsHttpConnection.cpp should compare time intervals in the same units r=dragana 2018-06-15 04:52:52 -07:00
Ben Kelly
13c58b163c Bug 1470234 Handle empty headers correctly when auto-copying headers for special internal redirect to InterceptedHttpChannel. r=valentin 2018-06-21 12:11:05 -07:00
Cosmin Sabou
4c18cd4036 Merge inbound to central. a=merge
--HG--
rename : servo/components/style/properties/longhand/box.mako.rs => servo/components/style/properties/longhands/box.mako.rs
2018-06-21 04:16:40 +03:00
Andrea Marchesini
f235838704 Bug 1461921 - Block storage access for third-parties on the tracking protection list - part 7 - Network cache, r=mayhemer, r=ehsan 2018-06-20 13:38:22 -04:00
Ben Kelly
dea8612c12 Bug 1468828 Automatically copy headers to the InterceptedHttpChannel when performing the special hidden internal redirect. r=valentin 2018-06-19 11:24:36 -04:00
Valentin Gosu
a8e3a8c349 Bug 1448330 - Make nsIURI.clone a private method r=mayhemer
MozReview-Commit-ID: 1efpeaEPaXP

--HG--
extra : rebase_source : e660f1e5bcae9b7119bc5b37713691069272b375
2018-06-14 13:05:43 +02:00
Valentin Gosu
4cade1b2b5 Bug 1389251 - Add esc_Spaces that may be used to force escaping of spaces r=bz,jdescottes
MozReview-Commit-ID: 4tahH3IOKW

--HG--
extra : rebase_source : 12057b98c87d7d3c57e90888082f540c49c5a9a9
2018-06-18 15:06:25 +02:00
Dorel Luca
ba31c8c2b2 Backed out 3 changesets (bug 1389251) for browser-chrome failure on browser/base/content/test/pageinfo/browser_pageinfo_image_info.js. CLOSED TREE
Backed out changeset a76a3251a9d2 (bug 1389251)
Backed out changeset c6baebf7b34c (bug 1389251)
Backed out changeset 6e89a11ae28e (bug 1389251)
2018-06-15 06:18:04 +03:00
Dorel Luca
b53fbe3617 Merge mozilla-central to autoland 2018-06-15 05:43:31 +03:00
Valentin Gosu
316f7bf9ac Bug 1389251 - Add esc_Spaces that may be used to force escaping of spaces r=bz,jdescottes
MozReview-Commit-ID: 7VgNlkWqrPK

--HG--
extra : rebase_source : c7ea99bc727a82e652871e78c222e8d5d642a52e
2018-06-12 03:05:03 +02:00
Andi-Bogdan Postelnicu
90ac230485 Bug 1453795 - Necko - Initialize member fields in classes/ structures. r=michal 2018-06-14 11:19:07 +03:00
Narcis Beleuzu
31030f080d Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-14 00:58:55 +03:00
Narcis Beleuzu
8aa6325a89 Merge inbound to mozilla-central. a=merge 2018-06-14 00:52:57 +03:00
Ehsan Akhgari
f4e3e1d715 Bug 1462432 - Part 1: Add an API to override the tracking status on an HTTP channel; r=mayhemer 2018-06-13 16:18:39 -04:00
Ben Kelly
2294b0f525 Bug 1468340 P2 Don't unconditionally set LOAD_BYPASS_SERVICE_WORKER in HttpChannelParent for non-synthesized channels. r=valentin 2018-06-13 06:41:47 -07:00
Ben Kelly
cc22e8c6d7 Bug 1468340 P1 Send the parent channel's load flags to the child process in Redirect1Begin. r=valentin 2018-06-13 06:41:47 -07:00
Ben Kelly
2c60e5ec03 Bug 1468248 Propagate nsIHttpChannelInternal.integrityMetadata to the parent when the channel is opened. r=valentin 2018-06-12 09:53:54 -07:00
Ben Kelly
f4e69fbdb7 Bug 1468209 Remove nsIHttpChannelInternal.responseSynthesized and use nsILoadInfo.serviceWorkerTaintingSynthesized instead. r=valentin 2018-06-12 07:02:01 -07:00
Ben Kelly
6301585f22 Bug 1467852 Align LoadInfo::mServiceWorkerTaintingSynthesized handling with other service worker fields. r=valentin 2018-06-10 18:44:38 -07:00
Valentin Gosu
9296b54502 Bug 1464135 - Pass the timing data to the child channel during OnStart r=baku
MozReview-Commit-ID: D07sY6dlINM

--HG--
extra : rebase_source : 020e94adc1d82f74e30fc71e5247b70798df9e8a
2018-06-13 03:02:23 +02:00
arthur.iakab
edbf2c0099 Merge inbound to mozilla-central a=merge 2018-06-08 12:55:49 +03:00
Kris Maglione
7b7264f453 Bug 1464548: Part 3 - Update callers to use defineLazyGlobalGetters. r=mccr8
MozReview-Commit-ID: 9APGewiDDYB

--HG--
extra : rebase_source : 2931dd0eec0e4206414b698a9700fc20d922eb3a
2018-05-25 17:02:29 -07:00
Nicholas Hurley
7a9f6d6eac Bug 1460590 part 1 - Fix our parsing of Server-Timing. r=valentin
We were erroneously looking for the first reasonably-valued
server-timing-param for each name. However, that's not how it works. We
should really be looking for the first server-timing-param regardless
of how reasonable its value is.

MozReview-Commit-ID: LwaHFyCpteU

--HG--
extra : rebase_source : 995f14fec3bd130e6eeada6c4cac0db0b27e618f
2018-06-01 11:39:49 -07:00
Nicholas Hurley
2423735102 Bug 1460310 - Separate HTTP and SPDY identifiers into separate namespaces. r=dragana
MozReview-Commit-ID: E55YpGK7PXI

--HG--
extra : rebase_source : 3146c7de66653262694235043a44be4ccf5ffc33
2018-06-01 11:32:05 -07:00
Michael Kaply
8c11aa5676 Bug 1464025 - Change accept header if locale changes. r=gandalf
MozReview-Commit-ID: HshY3mCab4M

--HG--
extra : rebase_source : f2b6c9e442cfc745e623288388da91ef34273be0
2018-06-06 19:12:45 -05:00
Valentin Gosu
aac6fb9470 Bug 1460609 - Cookies are for parents r=mayhemer
Make sure cookies aren't saved on channel headers in the content process.
Adds test to verify that this works, and removes tests that expected cookie headers to be visible to the child.

MozReview-Commit-ID: KOB83xpuAlF

--HG--
extra : rebase_source : 6f9a5ef570fb23200acf8d75285e67d80b7c27f0
2018-06-07 14:12:37 +02:00
Dorel Luca
535f1df913 Merge mozilla-central to mozilla-inbound 2018-06-04 21:48:29 +03:00
Valentin Gosu
bfbf927306 Bug 1459666 - Ensure that DivertToParent is only called during OnStartRequest r=dragana
The bug was caused by the tcp connection not sending back any data, and just being closed right away.
So we get something like this:
FTPChannelChild::DoOnStartRequest
FTPChannelChild::DoOnStopRequest -> nsUnknownDecoder::OnStopRequest -> (data is empty) -> nsUnknownDecoder::FireListenerNotifications -> nsDocumentOpenInfo::OnStartRequest -> ExternalHelperAppChild::OnStartRequest -> ExternalHelperAppChild::DivertToParent -> FTPChannelChild::DivertToParent.

However, in nsIDivertableChannel.idl the description for divertToParent() is "divertToParent is called in the child process. It can only be called during OnStartRequest()."

Enforcing this condition seems to be enough to avoid an infinite loop. The crash was fixed by bug 1436311.
2018-06-04 20:05:56 +02:00
Ben Kelly
85490e45e8 Bug 1441932 P3 Forward reserved client, initial client, and controller on Redirect2Verify message back to parent. r=mayhemer 2018-06-04 09:26:51 -07:00
Ben Kelly
1030889376 Bug 1441932 P2 Remove explicit ServiceWorker controller from http OnStartRequest message. r=mayhemer 2018-06-04 09:26:51 -07:00
Andreea Pavel
4ced6e8b2d Merge mozilla-central to autoland. a=merge 2018-06-03 07:27:01 +03:00
Ben Kelly
015a7772c0 Bug 1465580 Make HttpChannelParent get the channel status when its underlying channel is an InterceptedHttpChannel. r=mayhemer 2018-06-01 10:56:58 -07:00
Ben Kelly
6f4724874e Bug 1465587 Only hide the initial internal redirect to an InterceptedHttpChannel and not internal redirects initiated from IHC. r=mayhemer 2018-06-01 10:56:57 -07:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Kate McKinley
fa06a45b28 Bug 1328695 - Use protocol flags to determine if a URI is potentially trustworthy r=ckerschb, r=dveditz, r=mcmanus, r=bz
Before this change, the trusted URI schemes, based on a string whitelist, were:
https, file, resource, app, moz-extension and wss.

This change removes "app" from the list (since we don't implement it),
and adds "about" to the list (because we control the delivery of that).
2018-05-31 07:51:42 +02:00
Andrea Marchesini
1273dc5391 Bug 1446933 - Remove 'using namespace mozilla::net' from BackgroundUtils.h, r=qdot 2018-05-30 21:21:17 +02:00
Boris Zbarsky
dd184e287a Bug 1455676 part 5. Remove nsIDOMNode usage from netwerk/. r=qdot 2018-05-29 22:58:48 -04:00
Honza Bambas
6805e04ccc Bug 1456742 - Make sure to call UpdatePrivateBrowsing() in http channel to properly set private browsing state of the channel when no load group or callbacks have been set on it before AsyncOpen. r=jdm 2018-05-11 06:11:00 -04:00
Michal Novotny
63375bc80b Bug 1377570 - Enable RCWN on mobile. r=valentin
This patch enables racing cache with network on mobile when cellular data isn't used.
2018-05-27 03:59:00 +03:00
Margareta Eliza Balazs
03394c438d Merge inbound to mozilla-central. a=merge 2018-05-24 12:37:58 +03:00
Fabrice Desré
1d3ef19262 Bug 1452245 - The parent side isn't closed if the child dies unexpectedly, r=valentin 2018-05-23 15:22:00 +03:00
Andreea Pavel
2c92aa2095 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-05-24 01:03:40 +03:00
Andreea Pavel
0dada2bb52 Merge inbound to mozilla-central. a=merge 2018-05-24 01:00:23 +03:00
Patrick McManus
65939b6f9d Bug 1463509 - SOCKS support for Alternative Services r=valentin
MozReview-Commit-ID: 1oXnQuzOqsC

--HG--
extra : rebase_source : 84bfaec48c5fc216da6586e7f06f118292d3fb17
2018-05-22 13:50:56 -04:00
Andrea Marchesini
7dcc1b6880 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 9 - necko and docShell, r=mayhemer, r=smaug 2018-05-23 07:12:36 +02:00
Valentin Gosu
966bced714 Bug 1447191 - Pass loadFlags when creating FTP IPDL channel r=mayhemer
This fixes the "Assertion failure: PermissionAvailable(prin, aType), at nsPermissionManager.cpp:2341 when loading FTP URLs on debug builds"

MozReview-Commit-ID: 4eRGQ3hrUWo

--HG--
extra : rebase_source : 36516275b1fe0f266a08394484e19e0aecfbd671
2018-05-21 22:24:25 +02:00
Kris Maglione
8340513b0c Bug 1463287: Add QueryInterface helper macro for concrete class types. r=bz
Using concrete class types with static IIDs in QueryInterface methods is a
pretty common pattern which isn't supported by any existing helper macros.
That's lead to separate ad-hoc implementations, with varying degrees of
dodginess, being scattered around the tree.

This patch adds a helper macro with a canonical (and safe) implementation, and
updates existing ad-hoc users to use it.

MozReview-Commit-ID: HaTGF7MN5Cv

--HG--
extra : rebase_source : ace930129d85960d22bc3048ca3bb19bbbd4a63e
extra : histedit_source : 03a87f746d957789d41381e4e1bfcc4fd7eebaf2%2C9c5bae9feeeef7721105db67be0f83e0ded66bb7
2018-05-21 16:33:18 -07:00
shindli
4ff26c26f4 Merge inbound to mozilla-central. a=merge 2018-05-22 00:29:52 +03:00
Ben Kelly
8e95453379 Bug 1462464 Copy reserved and initial ClientInfo over when HttpChannelParent sees the special InterceptedHttpChannel redirect. r=valentin 2018-05-21 10:15:30 -07:00
Patrick McManus
f18aa94399 Bug 1462357 - remove the channel and socket interface id r=bagder,baku
the id was a b2g feature only settable via chrome privd xhr and is no
longer active in the code base

MozReview-Commit-ID: 84GPNvhvjNb

--HG--
extra : rebase_source : ab5c2229b98e1407b8b74ef2ee00dcfea45e046a
2018-05-16 16:05:03 -04:00
Csoregi Natalia
2f779be8d9 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-02 01:03:45 +03:00
Daniel Holbert
a053a5beb0 Bug 1465884: Back out no-longer-needed diagnostic for networking crash. r=mcmanus
This commit is a (rebased) backout of changeset 016bcae14073 from bug 1322610,
which simply added a diagnostic to gather more information about a crash.
We can remove that diagnostic now, hence this commit.

MozReview-Commit-ID: 6ea7SAX4PSV

--HG--
extra : rebase_source : c13d9cd5bac4761cfe2dab51f67967462b1bd962
2018-05-31 12:32:57 -07:00
Kris Maglione
1ff74da18d Bug 1461590: Lower-case hostnames when adding substitutions. r=smaug f=dveditz
Since URI hostnames are defined to be case-insensitive, we only ever see
lower-case hostnames when looking up substitutions. That means that
substitutions containing capital letters are inaccessible, which is a footgun
that has hit many people.

The handler should lower-case substitutions when they're added so that
look-ups are always case-insensitive.

MozReview-Commit-ID: C936hS2cSyY

--HG--
extra : rebase_source : a70e8ceb822879e51c3a40232b7dffdfb9c0a185
2018-05-15 13:02:08 -07:00
Adrian Wielgosik
af5b239997 Bug 1460940 - Remove nsIDOMDocument uses in netwerk/. r=bz
MozReview-Commit-ID: QkZ36LGoBx

--HG--
extra : rebase_source : 5aa83c576f269a6f33a1fb7ea7a61bd63a3c0c25
2018-05-11 19:46:15 +02:00
Dragana Damjanovic
df73f67e06 Bug 1436311 - Fix a bug in suspending a ftp channel during a divertion from the child to the parent. r=jduell
--HG--
extra : amend_source : f994e9737b607efd5922685c498d8f78c49d5be6
2018-04-27 11:41:00 -04:00
Nicholas Hurley
9ac69d34c4 Bug 1460313 - Remove unused mForTakeResponseHead. r=mcmanus
MozReview-Commit-ID: BIJvKrEeKiV

--HG--
extra : rebase_source : f493ad4ac213530f3a27454a8ebda031345f8bd9
2018-05-11 01:23:50 -07:00
Nicholas Hurley
5c3056ee3b Bug 1436610 - Send "TE: Trailers" header on h2 requests. r=mcmanus
MozReview-Commit-ID: 6Hpj5RcCb4I

--HG--
extra : rebase_source : aceb78d9fbf6a3cbb898fba7f0fa43a3d4ef9baa
2018-02-22 10:57:01 -08:00
Valentin Gosu
bd4365d7e7 Bug 1448058 - Remove nsIMutable from URI implementations r=mayhemer
* Also removes NS_TryToMakeImmutable, NS_TryToSetImmutable, URIIsImmutable
* NS_EnsureSafeToReturn, nsINetUtil.toImmutableURI

MozReview-Commit-ID: 5eFtFm2CQt7

--HG--
extra : rebase_source : 1f3d23ec646883e76844d42113bc1c71c01a1ad7
2018-05-09 18:21:24 +02:00
Randell Jesup
734a1bb77d Bug 1457323: Add network markers to Content processes, add redirects and improve markers r=mstange
Markers exist in Master and each Content process has markers for it's own
loads.  Note that there may be a time delay between content and master.
2018-05-08 15:50:39 -04:00
Chris Peterson
71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Andi-Bogdan Postelnicu
3f2298c2f6 Bug 1457411 - Update netwerk module to make use of newer methods introduced with c++11 and c++14. r=valentin
MozReview-Commit-ID: 666LNaHyiuQ

--HG--
extra : rebase_source : f3a24e0342d8dcdf9020dd473bc6b1045cbc533b
2018-04-30 19:46:04 +03:00
vinoth
6023457cfe Bug 1456151 - Apply Meta CSP to Content Privileged about:cache. r=ckerschb, r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D1013
2018-04-28 09:50:45 -04:00
Kris Maglione
a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
Dragana Damjanovic
5f7b2fb53b Bug 1457401 - Check if loadInfo is present. r=valentin 2018-04-27 05:39:00 +03:00
Michal Novotny
ee8f43208a Bug 1448476 - Cache entry corruption after writing the alternate data. r=honzab
When writing to alt-data output stream fails for whatever reason, we now try to
truncate alternative data and keep the original data instead of dooming the
whole entry. The patch also changes how is the predicted size passed to the
cache. Instead of a dedicated method it's now an argument of openOutputStream
and openAlternativeOutputStream methods which fail in case the entry would
exceed the allowed limit.
2018-04-25 07:01:00 +03:00
vinoth
e0f4fbbe1d Bug 1442551 - Console log added for NS_ERROR_DOM_BAD_URI. r=ckerschb
Reviewers: ckerschb

Reviewed By: ckerschb

Subscribers: flod, Pike

Bug #: 1442551

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

--HG--
extra : rebase_source : 2948376a84b35aba1c215edb38734ad99fcb1982
extra : amend_source : 73c90e63e5ff97b31c108e2618fe738bbf1460a3
2018-04-25 09:38:59 +03:00
Valentin Gosu
f96bb4a629 Bug 1423495 - Part6: Use threadsafe refcounting for nsServerTiming r=baku,nwgh
* Also keeps the timing array as nsTArray<nsCOMPtr<nsIServerTiming>> instead of the scriptable nsIArray (which doesn't like being released on another thread)

MozReview-Commit-ID: 37uPZJ38saQ

--HG--
extra : rebase_source : 099ec74c3032ef6033d187a028466777200c6015
2018-04-24 13:04:12 +02:00
Kershaw Chang ext:(%2C%20Valentin%20Gosu%20%3Cvalentin.gosu%40gmail.com%3E)
042ac19155 Bug 1423495 - Part4: Create doc entry form http channel if server timing headers are found for a document load r=baku
Currently, the document entry is created at the first time when some JS code tries to access it. But for the case when server timing headers exist for a document loading channel, we need to create the document entry and save the server timing data in the document entry.
If we don’t do this, the server timing data would be lost since the http channel will be deleted.

MozReview-Commit-ID: B5ksAZvZACq

--HG--
extra : rebase_source : 27bc6284ec417b2ff430a59cd9eeddc56b7a77ac
2018-01-12 03:13:00 +01:00
Randell Jesup
77b8bbfbe2 Bug 1453387: Add network load status reports to gecko-profiler markers r=mstange 2018-04-19 23:32:17 -04:00
Honza Bambas
7488001940 Bug 1452028 - Bring back network.http.fast-fallback-to-IPv4 preference, regression from bug 1430659. r=valentin
--HG--
extra : rebase_source : a33a72e2117f94aeb101eac8cd2b560fadfaae85
2018-04-13 10:04:00 -04:00
Sebastian Hengst
0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon
a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Nathan Froyd
7bb7ffd8c9 Bug 1453134 - part 1 - add a string input stream constructor that accepts move references; r=baku
This method is more efficient when we know we're not going to need the
string afterwards, and should cut down on intermediate allocations.
2018-04-11 10:06:17 -04:00
Nika Layzell
952f6a915a Bug 1443954 - Part 3: Add support for RefCounted types to IPDL, r=bz,froydnj,baku
This patch was reviewed in parts, however the intermediate states would not build:

Bug 1443954 - Part 3A: Strip pointers from the argument to WriteParam and WriteIPDLParam before selecting the ParamTraits impl, r=froydnj

Bug 1443954 - Part 3B: Move nsIAlertNotification serialization to the refcounted system, r=bz

Bug 1443954 - Part 3C: Move geolocation serialization to the refcounted system, r=bz

Bug 1443954 - Part 3D: Move nsIInputStream serialization to the refcounted system, r=baku

Bug 1443954 - Part 3E: Move BlobImpl serialization to the refcounted system, r=baku

Bug 1443954 - Part 3F: Correctly implement ParamTraits for actors after the ParamTraits changes, r=froydnj
2018-04-10 17:49:48 -04:00
Nika Layzell
b286bc10d9 Bug 1443379 - Stop pretending cacheKey can be anything other than uint32_t, r=smaug 2018-04-10 17:49:46 -04:00
Christoph Kerschbaumer
c0f8ff4e4d Bug 1451094 - Fix null loadinfo deref. r=mayhemer 2018-04-10 17:26:36 +02:00
Dave Townsend
2debd7677a Bug 1449259: Don't do proxy lookups for loads that are only going to come from the cache. r=mayhemer
MozReview-Commit-ID: GI9t8HWesZY

--HG--
extra : rebase_source : 9ef3adaacce86c03371957a4b8a6babcffbc7a89
2018-04-04 16:17:25 -07:00
Valentin Gosu
0f7acc7f3e Bug 1451295 - Add a null check for mChannel r=michal
MozReview-Commit-ID: 7YYhFQuKsPk

--HG--
extra : rebase_source : 1fd1ed99038e5f785aac4e8bde40cecf71dd2cea
2018-04-05 17:47:14 +03:00
Valentin Gosu
44b773489f Bug 1450726 - Missing null check for mLoadInfo r=jkt
MozReview-Commit-ID: Cz7qj1qulK1

--HG--
extra : rebase_source : 79fc4e37ea6b9fc280dcaf11c2b9661a1493c04c
2018-04-02 20:18:53 +03:00
Ben Kelly
0145a9634a Bug 1450874 P2 Don't save service worker time stamps if the fetch event didn't actually dispatch. r=asuth 2018-04-03 19:53:21 -07:00
Daniel Stenberg
a204c8eb02 bug 1450583 - require macOS 10.13.4 (uname 17.5.0) for enabling TFO r=mcmanus
MozReview-Commit-ID: LbfgT9oS9O

--HG--
extra : rebase_source : 6099048103e227d25550a2ed2358cf1b3118042a
2018-04-03 14:49:39 +02:00
Michal Novotny
e4fe2d6393 Bug 1436809 - Check that stream message was converted to string correctly. r=valentin
--HG--
extra : amend_source : a4dbdaa91a4af641b0a538aa208c19a122d30ae4
2018-04-02 12:59:18 -04:00
Tom Ritter
449237fc51 Bug 1378552 - Reduce the liklihood of inadvertently misusing NullPrincipal::Create(). r=ckerschb
NullPrincipal::Create() (will null OA) may cause an OriginAttributes bypass.
We change Create() so OriginAttributes is no longer optional, and rename
Create() with no arguments to make it more explicit about what the caller is doing.

MozReview-Commit-ID: 7DQGlgh1tgJ
2018-03-22 13:36:20 -05:00
Honza Bambas
d6561f3cd0 Bug 1433088 - Make the HTTP cache entry age based validation calculation work with the internal one-second only round-down resolution to make max-age=0 force immediate expiration. r=michal 2018-03-28 08:35:00 -04:00
Honza Bambas
d0b352582e Bug 1442784 - Carry isMainDocumentChannel HTTP channel flag to redirected HTTP channels, r=michal
--HG--
extra : rebase_source : fc3fa8510359725c8c7165f973f1aae7a1cc5def
2018-03-26 10:49:00 +03:00
Nicholas Nethercote
136f284c7d Bug 1436655 - Introduce a mechanism for VarCache prefs to be defined entirely in the binary. r=glandium
Currently VarCache prefs are setup in two parts:

- The vanilla pref part, installed via a data file such as all.js, or via an
  API call.

- The VarCache variable part, setup by an Add*VarCache() call.

Both parts are needed for the pref to actually operate as a proper VarCache
pref. (There are various prefs for which we do one but not the other unless a
certain condition is met.)

This patch introduces a new way of doing things. There is a new file,
modules/libpref/init/StaticPrefList.h, which defines prefs like this:

> VARCACHE_PREF(
>   "layout.accessiblecaret.width",
>   layout_accessiblecaret_width,
>   float, 34.0
> )

This replaces both the existing parts.

The preprocessor is used to generate multiple things from this single
definition:

- A global variable (the VarCache itself).

- A getter for that global variable.

- A call to an init function that unconditionally installs the pref in the
  prefs hash table at startup.

C++ files can include the new StaticPrefs.h file to access the getter.

Rust code cannot use the getter, but can access the global variable directly
via structs.rs. This is similar to how things currently work for Rust code.

Non-VarCache prefs can also be declared in StaticPrefList.h, using PREF instead
of the VARCACHE_PREF.

The new approach has the following advantages.

+ It eliminates the duplication (in all.js and the Add*VarCache() call) of the
  pref name and default value, preventing potential mismatches. (This is a real
  problem in practice!)

+ There is now a single initialization point for these VarCache prefs.
  + This avoids need to find a place to insert the Add*VarCache() calls, which
    are currently spread all over the place.
  + It also eliminates the common pattern whereby these calls are wrapped in a
    execute-once block protected by a static boolean (see bug 1346224).
  + It's no longer possible to have a VarCache pref for which only one of the
    pieces has been setup.

+ It encapsulates the VarCache global variable, so there is no need to declare
  it separately.

+ VarCache reads are done via a getter (e.g. StaticPrefs::foo_bar_baz())
  instead of a raw global variable read.
  + This makes it clearer that you're reading a pref value, and easier to
    search for uses.
  + This prevents accidental writes to the global variable.
  + This prevents accidental mistyping of the pref name.
  + This provides a single chokepoint in the code for such accesses, which make
    adding checking and instrumentation feasible.

+ It subsumes MediaPrefs, and will allow that class to be removed. (gfxPrefs is
  a harder lift, unfortunately.)

+ Once all VarCache prefs are migrated to the new approach, the VarCache
  mechanism will be better encapsulated, with fewer details publicly visible.

+ (Future work) This will allow the pref names to be stored statically, saving
  memory in every process.

The main downside of the new approach is that all of these prefs are in a
single header that is included in quite a few places, so any changes to this
header will cause a fair amount of recompilation.

Another minor downside is that all VarCache prefs are defined and visible from
start-up. For test-only prefs like network.predictor.doing-tests, having them
show in about:config isn't particularly useful.

The patch also moves three network VarCache prefs to the new mechanism as a
basic demonstration. (And note the inconsistencies in the multiple initial
values that were provided for
network.auth.subresource-img-cross-origin-http-auth-allow!) There will be
numerous follow-up bugs to convert the remaining VarCache prefs.

MozReview-Commit-ID: 9ABNpOR16uW
* * *
[mq]: fixup

MozReview-Commit-ID: 6ToT9dQjIAq
2018-03-26 09:39:40 +11:00
Honza Bambas
ee49bea9fc Bug 1447566 - Remove all remaning MOZ_ASSERT(!mSynTimer) checks from nsHalfOpenSocket, since we no longer enforce it null under certain conditions. r=valentin 2018-03-21 08:28:00 -04:00