Commit Graph

15496 Commits

Author SHA1 Message Date
Dragana Damjanovic
0a372ab31a Bug 1409667 - If an error occur it can happen the Http2Session does not have a connection. r=mcmanus 2017-10-18 16:27:32 +02:00
Sebastian Hengst
f9b5b9b40c merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 790IXj5MZ4f
2017-10-18 11:48:34 +02:00
Tom Ritter
f2a4c98eed Bug 1404035 Address an unused result warning in netwerk/socket/nsNamedPipeIOLayer.cpp r=bagder,nwgh
If we fail, we should fail.

MozReview-Commit-ID: KxtIx91nG3v

--HG--
extra : rebase_source : 91fa84a5b445ce5a09d7118479d9a77a952ca8bd
2017-10-10 13:06:49 -05:00
Sebastian Hengst
f3f32c7851 merge mozilla-central to mozilla-inbound. r=merge a=merge
--HG--
rename : media/libstagefright/binding/include/mp4_demuxer/ByteReader.h => media/libstagefright/binding/include/mp4_demuxer/BufferReader.h
extra : rebase_source : 98d9275bf6065bc701881aed6c4635f1da9ea642
2017-10-18 00:05:25 +02:00
Sebastian Hengst
34714cebde merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 2KL1o3EPUk
2017-10-17 23:52:28 +02:00
Dragana Damjanovic
ea3c619848 Bug 1384679 - Fix timing for TFO. r=mcmanus r=honza 2017-10-17 15:28:33 +02:00
Ben Kelly
8231685365 Bug 1204254 P14 Stop faking responseStart/End directly and make PerformanceTiming map SW specific timings instead. r=asuth 2017-10-17 13:38:56 -07:00
Ben Kelly
fe79c4da06 Bug 1204254 P12 Remove nsIInterceptedChannel.responseBody and backing nsPipe code. r=asuth 2017-10-17 13:38:55 -07:00
Ben Kelly
d48b092026 Bug 1204254 P9 Pass the body stream directly to StartSynthesizedResponse() instead of copying. r=asuth 2017-10-17 13:38:55 -07:00
Ben Kelly
33afdbe632 Bug 1204254 P8 Improve error handling and cancelation for intercepted HttpChannelChild. r=asuth 2017-10-17 13:38:55 -07:00
Ben Kelly
827e1b543b Bug 1204254 P7 Allow the body nsIInputStream to be passed in StartSynthesizeResponse(). r=asuth 2017-10-17 13:38:55 -07:00
Ben Kelly
8bf6429c5a Bug 1204254 P5 Don't rely on nsIInputStream::Available() during interception to get the total stream length. r=asuth 2017-10-17 13:38:54 -07:00
Ben Kelly
262c2cb4f2 Bug 1204254 P2 Move StartSynthesizedResponse() out from FinishSynthesizedResponse(). r=asuth 2017-10-17 13:38:54 -07:00
Ben Kelly
89cd4507cf Bug 1204254 P1 Add an nsIInterceptedChannel::StartSynthesizedResponse() method. r=asuth 2017-10-17 13:38:54 -07:00
Sebastian Hengst
b1cdb2af00 Backed out changeset 03e4f9175b16 (bug 1409329) 2017-10-17 22:03:39 +02:00
Sebastian Hengst
66e04dcde6 Backed out changeset 4666cde20909 (bug 1409327) 2017-10-17 22:03:33 +02:00
Andrea Marchesini
d526801916 Bug 1409327 - NS_NewBufferedInputStream should take the ownership of the inputStream, r=smaug 2017-10-17 20:38:05 +02:00
Andrea Marchesini
fe04c2050c Bug 1409329 - NS_NewBufferedOutputStream should take the ownership of the outputStream, r=smaug 2017-10-17 20:38:05 +02:00
Dragana Damjanovic dd.mozilla@gmail.com
3e2548c099 Bug 1393691 - timeout connection if tls takes too long. r=mcmanus 2017-10-17 14:06:45 +02:00
Sylvestre Ledru
982e6cfc6f Bug 1408957 - Remove netwerk/protocol/device/ (no longer used) r=dragana
MozReview-Commit-ID: 1SBMbBzE6DA

--HG--
extra : rebase_source : ab3b07055c9595e565f4dc7cf411e3afef41b99c
2017-10-16 12:12:16 +02:00
Sebastian Hengst
32f7c8fec3 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 1h3kZyrtqSt
2017-10-17 11:45:16 +02:00
Kris Maglione
635fc0e1ae Bug 1405286: Part 1 - Allow retrieving the delivery target from retargetable requests. r=dragana
After data delivery for a request has been retargeted, there's no reliable way
to get the appropriate event target to re-dispatch data events after
asynchronous processing.


While it's technically possible to retrieve the current thread from
OnDataAvailable callbacks and re-use that for later dispatch, that approach
has some issues:

1) It's not currently possible to reliably map the current thread to the
thread pool that owns it. That means that if data delivery is being targetted
to a thread pool, attempts to redispatch events to the previous delivery
thread might lead to long delays when one thread in a pool is blocked.

2) If a filter wishes to dispatch data events to the wrapped listeners before
it's recieved any data (as extensions StreamFilters sometimes do), there's no
way to determine the proper event target without waiting for initial data to
be received.


Simply returning the correct event target from the request solves both of
these problems.

MozReview-Commit-ID: CJxq7O4399R

--HG--
extra : rebase_source : db2f659ecad16daafdbcc108d7b1a51ea1af31f9
2017-10-14 18:30:38 -07:00
Kris Maglione
d1f06996d7 Bug 1404198: Part 2c - Switch to NS_NewTimer* in necko. r=njn
MozReview-Commit-ID: 3YyyaBAEjHc

--HG--
extra : rebase_source : 8ea5a8adb4d134ae15041f86f0b185603ab9a989
2017-10-15 23:12:02 -07:00
Kris Maglione
3876d40960 Bug 1404198: Part 1 - Add non-virtual constructor for nsIObject(Input|Output)Stream and update existing callers. r=njn
MozReview-Commit-ID: 3eoh6AwDJyz

--HG--
extra : rebase_source : 92b18b6ef07d276cac79ce735ca0b592cffbf87e
2017-10-04 20:06:28 -07:00
Jonathan Kew
290894f3c9 Bug 1408782 - Force punycode display for IDNs with a <dotless-i, combining mark above> sequence. r=valentin 2017-10-16 10:19:52 +01:00
Shih-Chiang Chien
1d51b00021 Bug 1407683 - use singleton factory method for nsHttpHandler. r=mayhemer
nsHttpHandler is designed only for `getService` but we do not protect against `createInstance`.
The singleton of nsHttpHandler will be replaced by new instance created via `createInstance`.
gHttpHandler will hold a dangling pointer after the new instance is destroyed.

MozReview-Commit-ID: DQV6pmb5BUK

--HG--
extra : rebase_source : a6ab90038853e057c632efb5206cc26dcd71b897
2017-10-12 12:13:56 +08:00
Valentin Gosu
c176c9cb48 Bug 1399467 - Remove assertion FTPChannelParent that is triggered by bad ftp URL r=michal
MozReview-Commit-ID: 3vBKRReapHa

--HG--
extra : rebase_source : 39b2d0cc772138888201a5324fb75602818669b7
2017-10-12 21:51:58 +02:00
Sebastian Hengst
373bdd8602 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 9adaYBJ4tlo
2017-10-13 23:37:41 +02:00
Ho-Pang Hsu
271618f7dd Bug 1395202 - Part 3: Create a testcase for nsICacheInfoChannel::cacheEntryId. r=michal, f=junior 2017-10-10 04:10:00 -04:00
Ho-Pang Hsu
24a4dd8501 Bug 1395202 - Part 2: Expose CacheEntryId to nsICacheInfoChannel. r=michal, f=junior 2017-10-12 02:25:00 -04:00
Ho-Pang Hsu
f56a0fb03f Bug 1395202 - Part 1: Create nsICacheEntry::CacheEntryId. r=michal, f=junior,mayhemer 2017-10-10 04:09:00 -04:00
Andrea Marchesini
20fa36b7c1 Bug 1405976 - PartiallySeekableInputStream must take the ownership of the underlying stream, r=qdot 2017-10-13 10:07:32 +02:00
Andrew McCreight
95785a8675 Bug 1402151, part 9 - Implement gtest for FTP directory listing parsing. r=michal
This test turns the existing stand alone test for the FTP directory
listing parser into a gtest.

MozReview-Commit-ID: 7n60TfcTXTJ

--HG--
extra : rebase_source : 79c88708a9bf9bee6c27a82f2c93a95016e063dd
2017-09-25 11:19:33 -07:00
Andrew McCreight
c617e8ebd2 Bug 1402151, part 8 - Add an argument to ParseFTPList to return the current time. r=michal
If the year is omitted from a listing, then the parsing code assumes
that the date occurred within the last year. To compute what the year
should be, the code thus needs to know what the current year, month
and day are. This patch parameterizes ParseFTPList over a function
that returns a PRTime. This will allow the gtest to pass in a fixed
time. Firefox itself will continue to use PR_Now to get the current
time.

MozReview-Commit-ID: 8IbVWbUBHYs

--HG--
extra : rebase_source : 41cc70a044bc19cb8556677cd3502bab3d6c95a4
2017-09-25 13:27:09 -07:00
Andrew McCreight
3b62ffa008 Bug 1402151, part 7 - Add a time zone argument to ParseFTPList. r=michal
In a few places, the FTP parser needs to know the time zone and
daylight savings time correction, encapsulated in
PRTimeParamFn. Before this patch, it would use the time zone of the
current machine, which would obviously make automated testing
difficult. This patch allows a caller to pass in a PRTimeParamFn,
which will allow the gtest to use GMT instead of whatever the local
time is.

MozReview-Commit-ID: 81R3Zbndr43

--HG--
extra : rebase_source : 274c3724259bc2f03f6a9b529ec005421c7c3ae2
2017-09-25 11:45:27 -07:00
Andrew McCreight
2fbc4292eb Bug 1402151, part 6 - Manual fixups for times in E-EPLF.out. r=michal
After the automatic fixes in the previous patch, a few of the times in
late March and early April are still off by an hour. Maybe this was
affected by the changes in when daylight savings time or some bug in
my conversion script. I have no idea. This patch just fixes the test
to match the actual output.

MozReview-Commit-ID: IghWfkWfxvi

--HG--
extra : rebase_source : ef2e8c6c3d5fbe3d50443ac0042d139e5da44d64
2017-09-25 12:53:01 -07:00
Andrew McCreight
6a0a07d59b Bug 1402151, part 5 - Adjust E-EPLF.out from Paris time to GMT. r=michal
The dates in the input for this file are specified as seconds since
Jan 1, 1970 or whenever. The conversion to a normal date depends on
the current time zone. The original output seems to have been
generated using GMT+1, with adjustments for daylight savings time at
the appropriate parts of the year. To make this easier to test, this
patch changes all of the times to GMT, without any daylight savings
time adjustment.

This change was automatically created by the Python script attached to
the bug.

MozReview-Commit-ID: 3uSAGtJYsMW

--HG--
extra : rebase_source : 2bdf3dd8f7d7b07320a19c4710ded75e4d0a86d1
2017-09-25 12:50:35 -07:00
Andrew McCreight
bceda2f2bf Bug 1402151, part 4 - Fix some FTP parser tests. r=michal
D-WinNT: The parser treats <JUNCTION> without an arrow as junk for
some reason. Chrome's FTP directory listing parser doesn't seem to
support <JUNCTION> at all, so it can't be too important. I just
deleted that from the expected output to match Firefox's current
behavior. I also added basic tests for three bugs that were fixed
without any tests landed.

E-EPLF.out: Add a license to the top.

U-WinNT.out: We're not testing junk or comment output, and we don't
use the list: prefix, so remove all of those. Also, we now output the
proper year (2000 instead of 00, for instance), so fix that in the
test output. Finally, the time in the output for this test is
formatted differently, for whatever reason, so change it to match the
actual output.

V-VMS-mix.out: Fix file sizes. File sizes on VMS can only be
approximated. When the FTP tests initially landed in 2002, this was
handled by not trying. Bug 22299 landed in 2003 and changed our
behavior to approximate the size, but the tests were not
updated.

MozReview-Commit-ID: 1DVfBfHh82y

--HG--
extra : rebase_source : 623ac06cb62497b8fc3db01f73c18b3cf0df6783
2017-09-25 11:26:18 -07:00
Andrew McCreight
ea0c1d283c Bug 1402151, part 3 - Move parse-ftp unit tests into the gtest directory. r=michal
This will make them easier to access from a gtest.

MozReview-Commit-ID: 3lV4DwTosXT

--HG--
rename : netwerk/streamconv/converters/parse-ftp/3-guess.in => netwerk/test/gtest/parse-ftp/3-guess.in
rename : netwerk/streamconv/converters/parse-ftp/3-guess.out => netwerk/test/gtest/parse-ftp/3-guess.out
rename : netwerk/streamconv/converters/parse-ftp/C-VMold.in => netwerk/test/gtest/parse-ftp/C-VMold.in
rename : netwerk/streamconv/converters/parse-ftp/C-VMold.out => netwerk/test/gtest/parse-ftp/C-VMold.out
rename : netwerk/streamconv/converters/parse-ftp/C-zVM.in => netwerk/test/gtest/parse-ftp/C-zVM.in
rename : netwerk/streamconv/converters/parse-ftp/C-zVM.out => netwerk/test/gtest/parse-ftp/C-zVM.out
rename : netwerk/streamconv/converters/parse-ftp/D-WinNT.in => netwerk/test/gtest/parse-ftp/D-WinNT.in
rename : netwerk/streamconv/converters/parse-ftp/D-WinNT.out => netwerk/test/gtest/parse-ftp/D-WinNT.out
rename : netwerk/streamconv/converters/parse-ftp/E-EPLF.in => netwerk/test/gtest/parse-ftp/E-EPLF.in
rename : netwerk/streamconv/converters/parse-ftp/E-EPLF.out => netwerk/test/gtest/parse-ftp/E-EPLF.out
rename : netwerk/streamconv/converters/parse-ftp/O-guess.in => netwerk/test/gtest/parse-ftp/O-guess.in
rename : netwerk/streamconv/converters/parse-ftp/O-guess.out => netwerk/test/gtest/parse-ftp/O-guess.out
rename : netwerk/streamconv/converters/parse-ftp/R-dls.in => netwerk/test/gtest/parse-ftp/R-dls.in
rename : netwerk/streamconv/converters/parse-ftp/R-dls.out => netwerk/test/gtest/parse-ftp/R-dls.out
rename : netwerk/streamconv/converters/parse-ftp/README => netwerk/test/gtest/parse-ftp/README
rename : netwerk/streamconv/converters/parse-ftp/U-HellSoft.in => netwerk/test/gtest/parse-ftp/U-HellSoft.in
rename : netwerk/streamconv/converters/parse-ftp/U-HellSoft.out => netwerk/test/gtest/parse-ftp/U-HellSoft.out
rename : netwerk/streamconv/converters/parse-ftp/U-NetPresenz.in => netwerk/test/gtest/parse-ftp/U-NetPresenz.in
rename : netwerk/streamconv/converters/parse-ftp/U-NetPresenz.out => netwerk/test/gtest/parse-ftp/U-NetPresenz.out
rename : netwerk/streamconv/converters/parse-ftp/U-NetWare.in => netwerk/test/gtest/parse-ftp/U-NetWare.in
rename : netwerk/streamconv/converters/parse-ftp/U-NetWare.out => netwerk/test/gtest/parse-ftp/U-NetWare.out
rename : netwerk/streamconv/converters/parse-ftp/U-Novonyx.in => netwerk/test/gtest/parse-ftp/U-Novonyx.in
rename : netwerk/streamconv/converters/parse-ftp/U-Novonyx.out => netwerk/test/gtest/parse-ftp/U-Novonyx.out
rename : netwerk/streamconv/converters/parse-ftp/U-Surge.in => netwerk/test/gtest/parse-ftp/U-Surge.in
rename : netwerk/streamconv/converters/parse-ftp/U-Surge.out => netwerk/test/gtest/parse-ftp/U-Surge.out
rename : netwerk/streamconv/converters/parse-ftp/U-WarFTPd.in => netwerk/test/gtest/parse-ftp/U-WarFTPd.in
rename : netwerk/streamconv/converters/parse-ftp/U-WarFTPd.out => netwerk/test/gtest/parse-ftp/U-WarFTPd.out
rename : netwerk/streamconv/converters/parse-ftp/U-WebStar.in => netwerk/test/gtest/parse-ftp/U-WebStar.in
rename : netwerk/streamconv/converters/parse-ftp/U-WebStar.out => netwerk/test/gtest/parse-ftp/U-WebStar.out
rename : netwerk/streamconv/converters/parse-ftp/U-WinNT.in => netwerk/test/gtest/parse-ftp/U-WinNT.in
rename : netwerk/streamconv/converters/parse-ftp/U-WinNT.out => netwerk/test/gtest/parse-ftp/U-WinNT.out
rename : netwerk/streamconv/converters/parse-ftp/U-hethmon.in => netwerk/test/gtest/parse-ftp/U-hethmon.in
rename : netwerk/streamconv/converters/parse-ftp/U-hethmon.out => netwerk/test/gtest/parse-ftp/U-hethmon.out
rename : netwerk/streamconv/converters/parse-ftp/U-murksw.in => netwerk/test/gtest/parse-ftp/U-murksw.in
rename : netwerk/streamconv/converters/parse-ftp/U-murksw.out => netwerk/test/gtest/parse-ftp/U-murksw.out
rename : netwerk/streamconv/converters/parse-ftp/U-ncFTPd.in => netwerk/test/gtest/parse-ftp/U-ncFTPd.in
rename : netwerk/streamconv/converters/parse-ftp/U-ncFTPd.out => netwerk/test/gtest/parse-ftp/U-ncFTPd.out
rename : netwerk/streamconv/converters/parse-ftp/U-no_ug.in => netwerk/test/gtest/parse-ftp/U-no_ug.in
rename : netwerk/streamconv/converters/parse-ftp/U-no_ug.out => netwerk/test/gtest/parse-ftp/U-no_ug.out
rename : netwerk/streamconv/converters/parse-ftp/U-nogid.in => netwerk/test/gtest/parse-ftp/U-nogid.in
rename : netwerk/streamconv/converters/parse-ftp/U-nogid.out => netwerk/test/gtest/parse-ftp/U-nogid.out
rename : netwerk/streamconv/converters/parse-ftp/U-proftpd.in => netwerk/test/gtest/parse-ftp/U-proftpd.in
rename : netwerk/streamconv/converters/parse-ftp/U-proftpd.out => netwerk/test/gtest/parse-ftp/U-proftpd.out
rename : netwerk/streamconv/converters/parse-ftp/U-wu.in => netwerk/test/gtest/parse-ftp/U-wu.in
rename : netwerk/streamconv/converters/parse-ftp/U-wu.out => netwerk/test/gtest/parse-ftp/U-wu.out
rename : netwerk/streamconv/converters/parse-ftp/V-MultiNet.in => netwerk/test/gtest/parse-ftp/V-MultiNet.in
rename : netwerk/streamconv/converters/parse-ftp/V-MultiNet.out => netwerk/test/gtest/parse-ftp/V-MultiNet.out
rename : netwerk/streamconv/converters/parse-ftp/V-VMS-mix.in => netwerk/test/gtest/parse-ftp/V-VMS-mix.in
rename : netwerk/streamconv/converters/parse-ftp/V-VMS-mix.out => netwerk/test/gtest/parse-ftp/V-VMS-mix.out
extra : rebase_source : a9924b40cd6d51750c875fce0f85262f6b86c85d
2017-09-25 10:58:11 -07:00
Andrew McCreight
1560fa65f4 Bug 1402151, part 2 - Clamp the number of blocks for a VMS file. r=michal
strtoul returns an |unsigned long|, and clamps the return value to
ULONG_MAX if the input is out of range. This means that the value
returned for large numbers differs between 32-bit and 64-bit
systems. To make testing easier, this patch clamps the return value to
UINT32_MAX, ensuring that 32-bit and 64-bit builds of Firefox will be
consistent.

Explicitly declaring that the intermediate value numBlocks is a
uint64_t also avoids (well-defined) integer overflow in the case of a
large file.

This patch also changes PRId64 to PRIu64, because the value being
printed is unsigned. However, this should not make a difference in
practice, because, with clamping, the maximum value being printed is
|UINT32_MAX * 512|.

I also cleaned up the comment that was a little garbled and contained
information about both the old and new ways this was handled, and
removed some code that has been ifdef'd out for at least 14 years.

MozReview-Commit-ID: HELmWmtx24O

--HG--
extra : rebase_source : d7a9f5ab09fcb97d5f6319e5fa1fca1a4f72aa52
2017-09-28 09:32:48 -07:00
Andrew McCreight
1cec304d04 Bug 1402151, part 1 - Improve handling of two digit years. r=michal
The tm_year field of PRExplodedTime is an absolute year, not years
since 1900, so fix a few places that try to do the latter.

I also made the conversion of 2 digit years more consistent.

MozReview-Commit-ID: GetS2wmXHhA

--HG--
extra : rebase_source : abdec76586add29b9741db5237bce77d976c8cdc
2017-09-21 16:34:07 -07:00
Ryan VanderMeulen
0dcd727f08 Merge m-c to autoland. a=merge 2017-10-11 17:55:13 -04:00
Phil Ringnalda
876ae3e424 Backed out 2 changesets (bug 870460) for xperf failures
Backed out changeset 50368fa3e040 (bug 870460)
Backed out changeset 5aa7980268cb (bug 870460)

MozReview-Commit-ID: H0rzd5F9dOr
2017-10-11 13:26:34 -07:00
Samael Wang
70b282bfef Bug 1401522 - Don't apply statusCode sent from parent if mCanceled or mStatus has been modified in the child. r=mayhemer
When a WyciwygChannel is canceled, but WyciwygChannelParent::RecvCancel happens
after WyciwygChannelParent::SendOnStartRequest, it would send statusCode=NS_OK
to WyciwygChannelChild::OnStartRequest. So we should not apply the statusCode
if mCanceled, just like how HttpChannelChild handles it.

MozReview-Commit-ID: 5H3PUrlArIA

--HG--
extra : rebase_source : 9e8b034d293dc50d126327dc6452e95335e35ae6
2017-09-28 11:16:53 +08:00
Valentin Gosu
e553e05838 Bug 1407540 - Allow MozURL to be constructed with a base URL r=mayhemer
MozReview-Commit-ID: Fg2aDJPhwQO

--HG--
extra : rebase_source : 47294abc8cd339143c1deaac0dc3449602fe53f1
2017-10-11 12:18:28 +02:00
Sebastian Hengst
044775ad49 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-10-11 00:01:28 +02:00
evilpies@gmail.com
06beef32ba Bug 1305237 LoadInfo changes to include all ancestors principals and window IDs, r=bz,mystor
MozReview-Commit-ID: 1IMi5MqTx7o

--HG--
extra : rebase_source : 373f1928987718fe3bc22306e0dd3ae13fc0cd9f
2017-10-10 09:54:00 -07:00
Dragana Damjanovic
262c361ad5 Bug 1400554 - Cancel a time in TLSFilterTransaction if transaction is canceled. r=mcmanus
--HG--
extra : amend_source : f5ede6ac54301e636e122bf6e2dc98057633b436
2017-10-09 14:59:32 -04:00
Andrew McCreight
d49d38778b Bug 1371891 - Use CheckedInt to compute guess for the location of -> in FTP parser. r=michal 2017-10-09 13:50:02 -04:00
Ben Kelly
6097f72d6a Bug 1391693 P12 Propagate creation and start times to InterceptedHttpChannel from original channel. r=valentin 2017-10-09 10:03:42 -07:00
Ben Kelly
4d2d40a639 Bug 1391693 P11 Remove old nsHttpChannel interception bits. r=valentin 2017-10-09 10:03:42 -07:00
Ben Kelly
f3f0b978e0 Bug 1391693 P9 Make nsHttpChannel redirect to InterceptedHttpChannel to fire a ServiceWorker FetchEvent. r=asuth r=valentin 2017-10-09 10:03:41 -07:00
Ben Kelly
b27e98a26d Bug 1391693 P8 Add new InterceptedHttpChannel class to represent parent-side channel with a ServiceWorker FetchEvent. r=asuth r=valentin 2017-10-09 10:03:41 -07:00
Ben Kelly
df180af556 Bug 1391693 P7 Make HttpChannelParent and HttpChannelParentListener allow an internal redirect during service worker interception. r=jdm 2017-10-09 10:03:41 -07:00
Ben Kelly
91eddc52d4 Bug 1391693 P6 Make HttpChannelParent operate on HttpBaseChannel objects instead of nsHttpChannel directly. r=valentin 2017-10-09 10:03:41 -07:00
Ben Kelly
b4550ab09a Bug 1391693 P5 Move some helper methods from nsHttpChannel to HttpBaseChannel. r=valentin 2017-10-09 10:03:40 -07:00
Ben Kelly
20f23200cd Bug 1391693 P1 Rename nsIInterceptedChannel.cancel() to cancelInterception() r=jdm 2017-10-09 10:03:40 -07:00
Honza Bambas
3a7ab1ab78 Bug 1405199 - Update result principal URI on the new channel when nsBaseChannel redirects. r=bz 2017-10-09 07:50:00 -04:00
Jonathan Kew
597f9d1021 Bug 1404349 - Extend check from bug 1370497 to apply to marks with a specific Script property, as well as those with Script=Inherited. r=valentin 2017-10-09 13:23:18 +01:00
Sebastian Hengst
aa78440a09 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: EE6DcCgHufi
2017-10-09 11:19:20 +02:00
Nicholas Nethercote
8a68e6fb83 Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange.
Currently the Gecko Profiler defines a moderate amount of stuff when
MOZ_GECKO_PROFILER is undefined. It also #includes various headers, including
JS ones. This is making it difficult to separate Gecko's media stack for
inclusion in Servo.

This patch greatly simplifies how things are exposed. The starting point is:

- GeckoProfiler.h can be #included unconditionally;

- everything else from the profiler must be guarded by MOZ_GECKO_PROFILER.

In practice this introduces way too many #ifdefs, so the patch loosens it by
adding no-op macros for a number of the most common operations.

The net result is that #ifdefs and macros are used a bit more, but almost
nothing is exposed in non-MOZ_GECKO_PROFILER builds (including
ProfilerMarkerPayload.h and GeckoProfiler.h), and understanding what is exposed
is much simpler than before.

Note also that in BHR, ThreadStackHelper is now entirely absent in
non-MOZ_GECKO_PROFILER builds.
2017-10-04 09:11:18 +11:00
Nicholas Nethercote
d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Valentin Gosu
af25740183 Bug 1394906 - Implement immutable, threadsafe MozURL r=mayhemer
Also adds the necessary methods to rust-url-capi and fixes a bug in rusturl_set_username
MozReview-Commit-ID: 9rsPIQAbWBJ

--HG--
extra : rebase_source : a1dee0b0e26a5c816f47a7c7c779c2454f87f51f
2017-10-07 15:51:03 +03:00
Sebastian Hengst
ba7d7feb7d Backed out changeset 125125b32aaa (bug 1394906) for static failures. r=backout 2017-10-07 13:10:28 +02:00
Valentin Gosu
c8f704a21e Bug 1394906 - Implement immutable, threadsafe MozURL r=mayhemer
Also adds the necessary methods to rust-url-capi and fixes a bug in rusturl_set_username
MozReview-Commit-ID: 9rsPIQAbWBJ

--HG--
extra : rebase_source : 550aafbfb1d57257db49897a7506ebb9f038021f
2017-10-07 01:15:59 +02:00
Sebastian Hengst
b834f0d177 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 7Ez95T2ivfR
2017-10-07 10:37:39 +02:00
Ben Kelly
31b2e31df3 Bug 1351521 P1 Add intercepted HttpChannelChild channels to the performance timeline. r=asuth 2017-10-06 09:04:55 -07:00
Ben Kelly
cc9c9dd739 Bug 1191943 P2 Copy service worker timing information across redirects. r=asuth 2017-10-06 09:04:54 -07:00
Ben Kelly
b4b2a21adc Bug 1405739 P1 Don't expose internal redirect start/end/count through performance timing API. r=valentin 2017-10-06 09:04:54 -07:00
David Keeler
ac3f580c91 bug 1404824 - add a test for the BE_CONSERVATIVE flag if TLS is restricted to 1.3 only r=mayhemer
MozReview-Commit-ID: 736DS5zf5yp

--HG--
rename : netwerk/test/unit/test_be_conservative.js => netwerk/test/unit/test_be_conservative_error_handling.js
extra : rebase_source : 61c39efc8f86fc65723ec65f125be4493c8210a0
2017-10-03 14:35:27 -07:00
Sebastian Hengst
6782409d2b merge mozilla-central to autoland. r=merge a=merge on a CLOSED TREE 2017-10-05 11:45:17 +02:00
Sebastian Hengst
cade0f0bf3 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: CsjtXJM2vcs
2017-10-05 10:55:31 +02:00
Liang-Heng Chen
ef46bde5d2 Bug 1405496 - remove unnecessary assertion; r=bagder
The assertion does not have to be true.

MozReview-Commit-ID: HrXpPsO0rQd

--HG--
extra : rebase_source : 31cb1a715f5487ed32f9e3b31442904a185896d7
2017-10-05 10:59:11 +08:00
Kris Maglione
3676137220 Bug 1404172: Remove MatchPattern.jsm. r=aswan
MozReview-Commit-ID: ItGMuChHS3z

--HG--
rename : toolkit/modules/addons/MatchPattern.jsm => toolkit/modules/addons/MatchURLFilters.jsm
extra : rebase_source : 986542ba4270799ca1d213d5b4807d12ab7ac148
2017-09-28 18:27:44 -07:00
Tom Ritter
26f1bc6cd8 Bug 1404147 Cast constants to the type they are compared to r=smaug
MozReview-Commit-ID: JQDZTBOALZm

--HG--
extra : rebase_source : 5cb3ed5da7f99defd524247ff798c9c501ef851a
2017-09-28 17:47:43 -05:00
Ben Kelly
fae6da18dd Bug 1407186 P2 Test that we reset the interception if ChannelIntercepted() returns an error. r=asuth 2017-10-11 11:23:46 -07:00
Ben Kelly
7e75d68ef3 Bug 1407186 P1 Fix InterceptedHttpChannel::AsyncOpen() error handling. r=asuth 2017-10-11 11:23:46 -07:00
Honza Bambas
62eaa517f9 Bug 1401538 - Drop mTimerScheduledAt at RequestContext::CancelTailedRequest when tail queue is empty. r=kershaw 2017-10-10 06:34:00 -04:00
Alex Gaynor
b0f90f5b09 Bug 1406997 - Fix a comment typo in HttpChannelParent.cpp. r=billm
MozReview-Commit-ID: 7RoCfaOXf3C

--HG--
extra : rebase_source : 757bcd4f11b0426b1ba056550bd534377d56fc91
2017-10-11 10:13:56 -04:00
Junior Hsu
db2853b001 Bug 870460 - Part 2: Close syncconn for edge cases. r=nwgh 2017-10-09 00:19:00 -04:00
Junior Hsu
b92cc07390 Bug 870460 - Part 1: Let cookie db startup-read off-main-thread. r=nwgh, r=jdm, data-r=francois 2017-08-29 18:16:27 +08:00
Randell Jesup
dd84234b15 Bug 1400563: clean up SCTP shutdown r=drno 2017-10-11 00:40:21 -04:00
Ben Kelly
0279ba6a21 Bug 1407225 Make InterceptedHttpChannel abort if the channel has been canceled during a redirect. r=asuth 2017-10-10 08:45:54 -07:00
Sebastian Hengst
99c7358944 Backed out changeset 0e5484914609 (bug 1395202) for build bustage at netwerk/protocol/http/HttpChannelParent.cpp:1523: 'class mozilla::net::HttpBaseChannel' has no member named 'GetCacheEntryId'. r=backout on a CLOSED TREE 2017-10-10 15:43:13 +02:00
Sebastian Hengst
b6ccfad07b Backed out changeset 92e3c67a3872 (bug 1395202) 2017-10-10 15:42:13 +02:00
Sebastian Hengst
44b9915533 Backed out changeset 7598b4ed02f6 (bug 1395202) 2017-10-10 15:42:07 +02:00
Mike Hommey
3af63f59c0 Bug 1403366 - When NS_XPCOM_INIT_CURRENT_PROCESS_DIR is not already set, fallback to BinaryPath's parent. r=froydnj
The Windows and OSX code paths were essentially doing the same thing,
and the Unix fallback was using an old convention that is pretty much
outdated.

Under normal conditions (XPCOM initialized by Firefox),
NS_XPCOM_INIT_CURRENT_PROCESS_DIR is set from BinaryPath anyways, so
this only really affects adhoc XPCOM initialization from e.g. C++ unit
tests.

--HG--
extra : rebase_source : b3151fffd4c82159b633a48dead86f2c3b0a03d6
2017-09-28 10:49:48 +09:00
Mike Hommey
d43f368c0d Bug 1405174 - Fix resolution of resource: URLs when the target of the substitution doesn't end with a /. r=valentin
When for some reason the target of a resource: substitution doesn't end
with a / (which can happen when e.g. building a FileURI with a path
that doesn't exist), relative path resolution of the resource URLs end
up rooted under the parent of the non-existing directory.

e.g
  resource://foo/bar is substituted with /path/for/bar if
  resource://foo/ is registered for file:///path/for/foo (instead of
  file:///path/for/foo/)

--HG--
extra : rebase_source : b59dae0337a707a96adfc1c89c27235a856ec58e
2017-09-30 08:49:28 +09:00
Sebastian Hengst
5057df5497 Backed out changeset 8aeb6541520a (bug 1405174) for landing wrong version of patch. r=backout 2017-10-05 01:06:56 +02:00
Mike Hommey
155c57e385 Bug 1405174 - Fix resolution of resource: URLs when the target of the substitution doesn't end with a /. r=valentin
When for some reason the target of a resource: substitution doesn't end
with a / (which can happen when e.g. building a FileURI with a path
that doesn't exist), relative path resolution of the resource URLs end
up rooted under the parent of the non-existing directory.

e.g
  resource://foo/bar is substituted with /path/for/bar if
  resource://foo/ is registered for file:///path/for/foo (instead of
  file:///path/for/foo/)

--HG--
extra : rebase_source : 9907f7c54f43851ba1a956a5d278d301013204d2
2017-09-30 08:49:28 +09:00
Sebastian Hengst
2d086eadde Backed out changeset 207925bbf88d (bug 1403366) 2017-10-04 01:27:02 +02:00
Sebastian Hengst
ebd4a79eb5 Backed out changeset 9c05226e2248 (bug 1405174) for failing browser-chrome's toolkit/components/addoncompat/tests/browser/browser_addonShims.js and netwerk/test/browser/browser_child_resource.js. r=backout 2017-10-04 01:19:30 +02:00
Mike Hommey
863d6e0695 Bug 1403366 - When NS_XPCOM_INIT_CURRENT_PROCESS_DIR is not already set, fallback to BinaryPath's parent. r=froydnj
The Windows and OSX code paths were essentially doing the same thing,
and the Unix fallback was using an old convention that is pretty much
outdated.

Under normal conditions (XPCOM initialized by Firefox),
NS_XPCOM_INIT_CURRENT_PROCESS_DIR is set from BinaryPath anyways, so
this only really affects adhoc XPCOM initialization from e.g. C++ unit
tests.

--HG--
extra : rebase_source : b3151fffd4c82159b633a48dead86f2c3b0a03d6
2017-09-28 10:49:48 +09:00
Mike Hommey
7213aff68a Bug 1405174 - Fix resolution of resource: URLs when the target of the substitution doesn't end with a /. r=valentin
When for some reason the target of a resource: substitution doesn't end
with a / (which can happen when e.g. building a FileURI with a path
that doesn't exist), relative path resolution of the resource URLs end
up rooted under the parent of the non-existing directory.

e.g
  resource://foo/bar is substituted with /path/for/bar if
  resource://foo/ is registered for file:///path/for/foo (instead of
  file:///path/for/foo/)

--HG--
extra : rebase_source : 50a329318a2424bc5679a2e026e755271214224a
2017-09-30 08:49:28 +09:00
Sebastian Hengst
e8e914baa7 Backed out changeset c033bdb24e14 (bug 1371699) 2017-10-03 16:55:02 +02:00
Michal Novotny
a60970a6a1 Bug 1403010 - Crash due to race condition in CacheFileMetadata::SizeOfExcludingThis when reading or writing metadata, r=valentin 2017-10-03 16:49:39 +02:00
Michal Novotny
d3a3055806 Bug 1401224 - Do not call aWriter with no data in CacheFileInputStream::ReadSegments, r=valentin 2017-10-03 16:48:16 +02:00
Amy Chung
3eec3617b1 Bug 1399590 - Modify the argument of nsICookiePermission::CanAccess for changing nsIURI to nsIPrincipal. r=jdm 2017-10-03 14:37:11 +08:00
Sebastian Hengst
92986dd48f merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-10-03 11:46:17 +02:00
Andrea Marchesini
ff3b280260 Bug 1371699 - Use of NonBlockingAsyncInputStream in our code base, r=froydnj 2017-10-03 07:20:18 +02:00
Wes Kocher
7c7aca4ea6 Backed out 2 changesets (bug 1305237) for crashtest failures in 403574-1.xhtml and 1282985-1.svg a=backout
Backed out changeset 96b5d596cc27 (bug 1305237)
Backed out changeset 5fe72402746f (bug 1305237)

MozReview-Commit-ID: CjCWY73Hps1

--HG--
extra : rebase_source : 7a9f0893dabdb0cb6ea79cc9cb7169ceed14616f
2017-10-02 16:41:56 -07:00
evilpies@gmail.com
af192f668f Bug 1305237 LoadInfo changes to include all ancestors principals and window IDs, r=bz
MozReview-Commit-ID: ADVtxjSQjk5

--HG--
extra : rebase_source : 6e0ddf49328d7ae71937b7bbe5e5bea736c49bef
2017-10-02 11:05:33 -07:00
Wes Kocher
6b7e085c86 Backed out 2 changesets (bug 1305237) for bc failures in browser_WebRequest_ancestors.js a=backout
Backed out changeset 163a2b0bb0a0 (bug 1305237)
Backed out changeset e05bab140564 (bug 1305237)

MozReview-Commit-ID: GLlbWYZqyVS
2017-10-02 13:35:03 -07:00
evilpies@gmail.com
8d8e27a06f Bug 1305237 LoadInfo changes to include all ancestors principals and window IDs, r=bz
MozReview-Commit-ID: ADVtxjSQjk5

--HG--
extra : rebase_source : 6e0ddf49328d7ae71937b7bbe5e5bea736c49bef
2017-10-02 11:05:33 -07:00
Honza Bambas
094d78b20f Bug 1403998 - Make view-source channels return correct resultPrincipalURI via LoadInfo after redirect. r=bz
--HG--
extra : rebase_source : 8564111630c4a32a098721121a2e52d46e98e616
2017-10-02 10:12:00 -04:00
Wes Kocher
1674eb3e4f Merge inbound to m-c a=merge
MozReview-Commit-ID: 7zOjePOWzOM
2017-09-28 16:56:44 -07:00
Wes Kocher
2c04ebdaa3 Merge autoland to central, a=merge
MozReview-Commit-ID: LTZmzqpIUXI
2017-09-28 15:49:14 -07:00
Ryan VanderMeulen
2ccfaf0697 Backed out changesets d0d30a90efa1 and fd1d81b93380 (bug 1305237) for causing bug 1403932. 2017-09-28 17:55:43 -04:00
Wes Kocher
61c098eae7 Merge inbound to m-c a=merge CLOSED TREE
MozReview-Commit-ID: 3pMHYV9oXLm

--HG--
rename : dom/base/nsReferencedElement.cpp => dom/base/IDTracker.cpp
rename : dom/base/nsReferencedElement.h => dom/base/IDTracker.h
2017-09-27 16:51:49 -07:00
evilpies@gmail.com
95cfc510a9 Bug 1305237 LoadInfo changes to include all ancestors principals and window IDs, r=bz
MozReview-Commit-ID: JdOjc7Ihhv

--HG--
extra : rebase_source : 82ac220ad4cb39536014d5732b4731f0889dafa6
2017-09-25 12:12:47 -07:00
hanbinchang
f33b2dcc82 Bug 1386168 - Remove nsIOservice::mProxyService. r=bagder 2017-08-04 00:09:11 -04:00
Kershaw Chang
36e139a775 Bug 1401863 - Handle the case when gNeckoChild is null properly in RequestContext::BeginLoad. r=mayhemer
In child process, during shutdown, it's possible that IsNeckoChild() is true but gNeckoChild is null. When this case happens, it is necessary to return early in RequestContext::BeginLoad to avoid modifying mAfterDOMContentLoaded.
2017-09-26 19:30:00 -04:00
Jonathan Kew
cb611a9aff Bug 1370497 - Check ScriptExtensions property of combining marks when available. r=valentin 2017-09-27 11:16:35 +01:00
Chris Peterson
c4dff4f83d Bug 1402666 - Part 3: Replace Replace(NS_LITERAL_STRING("")) with ReplaceLiteral(u""). r=erahm
MozReview-Commit-ID: Ji6UdG32RF4

--HG--
extra : rebase_source : 1565a1e99f40785dad0d0d7652e42222dcdf8881
extra : source : c57e906ba75fda4745134ef8307589e28f4c8d70
2017-09-15 19:32:55 -07:00
Chris Peterson
14c40f3dac Bug 1402666 - Part 1: Replace Replace("") with ReplaceLiteral(""). r=erahm
MozReview-Commit-ID: s2hrTSkBiJ

--HG--
extra : rebase_source : d3b3551ed7ed1d5c8f70fc98d72510a13868ada1
extra : source : 1c45e10702e7884cd536a25b1d39c3de90fd2914
2017-09-15 19:22:58 -07:00
Wes Kocher
a341b32d06 Merge autoland to central, a=merge
MozReview-Commit-ID: 8B7y2ULc04
2017-09-26 17:11:14 -07:00
Haik Aftandilian
09191cce06 Bug 1402205 - Non-existent background page blocks extension startup. r=kmag
Add calls to OnStartRequest() and OnStopRequest() to properly handle async
read failures for remote JAR's and remote unpacked extension resources.

MozReview-Commit-ID: Dcg0LDht9B9

--HG--
extra : rebase_source : fef29e1601c1a53d3b7ff3a9d96450b3ab8fe003
2017-09-25 15:48:40 -07:00
Johann Hofmann
a98b34501b Bug 1379560 - Part 1 - Add a default permission pref in the permission manager. r=mystor,Paolo
This patch enables support for setting prefs with the pattern
permissions.default.* to provide a custom default permission
for arbitrary permission types in nsPermissionManager.

The previous default of UNKNOWN_ACTION is honored if no pref is set.

A default value is provided if no permission entry can be found in the db.
Accordingly, the patch does not affect the behavior of functions
that return permission objects from the db such as GetPermissionObject,
which returns null if no entry was found.

MozReview-Commit-ID: 3JECI6kXqGf

--HG--
extra : rebase_source : 9fbcfc740a85c02cf4245956e69ae13c8f90b5ab
2017-07-10 23:13:43 +02:00
Sebastian Hengst
8e4b879a3c Backed out changeset fe37f3401424 (bug 870460) for frequently failing chrome tests on Windows 10. r=backout
--HG--
extra : amend_source : 7acd368a844029a62c8c2c500fbd431b86593e83
2017-10-12 20:31:02 +02:00
Sebastian Hengst
54139f1124 Backed out changeset d76e2193be25 (bug 870460) 2017-10-12 20:30:57 +02:00
Junior Hsu
0532585ef4 Bug 870460 - Part 2: Close syncconn for edge cases. r=nwgh
--HG--
extra : source : 50368fa3e040a806a0b86c0c6471055f4cb41ae1
2017-10-09 00:19:00 -04:00
Junior Hsu
6acbefaa2c Bug 870460 - Part 1: Let cookie db startup-read off-main-thread. r=nwgh, r=jdm, data-r=francois
--HG--
extra : source : 5aa7980268cb3c335fb7d44090e925563be9d0a2
2017-08-29 18:16:27 +08:00
Andi-Bogdan Postelnicu
f14dd577bb Bug 1402362 - modified NET_MAX_ADDRESS to have UINTPTR_MAX value. r=valentin
MozReview-Commit-ID: 4tPNMWypVFo

--HG--
extra : rebase_source : 8ef4e0960b8b3e3d9781aa5ed94d69a0073edb7a
2017-09-27 15:09:29 +03:00
Thomas Nguyen
1b74e11955 Bug 1351147 - Support ThreatHit requests in SafeBrowsing V4 r=francois
MozReview-Commit-ID: 3ifQtdOTulE

--HG--
extra : rebase_source : d9854fba4e2dcbb7310ca73fec3305ba32bbb7ae
2017-08-24 11:13:12 +08:00
Thomas Nguyen
651c28ca53 Bug 1351147 - Use fullhash instead of prefix in OnClassifyComplete r=francois
In order to optionally report the full hash back to Google, we need to keep it
around in the callback. While a prefix is not the same as a full hash (multiple
full hashes can map to the same prefix), in this case, the callback will only be
called when the full hash matches.

MozReview-Commit-ID: F4WSLZpYrXB

--HG--
extra : rebase_source : da3b16b00729d0aa6ff1765a135b751fcf44c012
2017-08-04 18:20:13 +08:00
Nicholas Nethercote
dfd3b7e7aa Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ

--HG--
extra : rebase_source : 254404e318e94b4c93ec8d4081ff0f0fda8aa7d1
2017-09-26 08:33:21 +10:00
Shih-Chiang Chien
10b963a865 Bug 1372065 - fix cppcheck linter error in Necko. r=jduell
For netwerk/cache2/CacheFileInputStream.cpp:148 and netwerk/protocol/http/nsHttpHeaderArray.cpp:358,
missing "()" in the if statement.

For netwerk/base/rust-url-capi/test/test.cpp:29, netwerk/streamconv/converters/nsHTTPCompressConv.cpp:297,
and netwerk/streamconv/converters/nsHTTPCompressConv.cpp:300, null pointer will be returned but the
original memory buffer will not be freed if |realloc| fails.  We should remember the original memory
buffer and free it if error is detected.

MozReview-Commit-ID: 2ggXsL73jYV

--HG--
extra : rebase_source : e47e41f2b37f717207bd13990efead22a14db1c0
2017-06-12 11:51:26 +08:00
Sebastian Hengst
538797050e Backed out changeset dfb238189002 (bug 1408552) for asserting in xpcshell's netwerk/test/unit_ipc/test_cache-entry-id_wrap.js. r=backout on a CLOSED TREE 2017-10-18 15:56:09 +02:00
Sebastian Hengst
ffcd2ce160 merge mozilla-central to autoland. r=merge a=merge on a CLOSED TREE
--HG--
extra : amend_source : ef359be373a97cad5a91f0150a46add4c3d8ab7c
2017-10-18 15:54:23 +02:00
Valentin Gosu
ec70ea390d Bug 1408552 - Make sure we only instantiate CacheStorageService in the main process r=mayhemer
* A memory leak occurs when this happens in the content process
* I added an assertion that we only create it in the parent process

MozReview-Commit-ID: 1UTyusRg0qx

--HG--
extra : rebase_source : 646c1c82d141cadc6c1b19843b4cc750e1a1ce59
2017-10-18 14:35:33 +02:00
Andrea Marchesini
1ad94a2680 Bug 1402888 - Remove nsIStreamTransportService::createOutputStream, r=smaug 2017-09-26 07:22:32 +02:00
Andrea Marchesini
53d31f2d9c Bug 1402888 - Remove nsIInputStreamPump::Init() offset and limit params, r=smaug 2017-09-26 07:21:44 +02:00
Andrea Marchesini
86c5c52e0e Bug 1402888 - Remove nsIStreamTransportService::createInputStream startOffset and readLimit params, r=smaug 2017-09-26 07:21:27 +02:00
Sebastian Hengst
15b8e9a53b Backed out changeset 097c44e15165 (bug 1371699) 2017-10-05 13:10:55 +02:00
Sebastian Hengst
fd1c572923 merge mozilla-central to mozilla-inbound. r=merge a=merge on a CLOSED TREE 2017-10-05 11:47:25 +02:00
Andrea Marchesini
e1d4351ed9 Bug 1403706 - Remove race conditions in temporary blob - part 8 - Remove nsTemporaryFileInputStream, r=smaug 2017-10-05 07:41:43 +02:00
Andrea Marchesini
a1f76012a9 Bug 1403706 - Remove race conditions in temporary blob - part 4 - Remove DELETE_ON_CLOSE nsIFileInputStream, r=smaug 2017-10-05 07:41:41 +02:00
Andrea Marchesini
1867437172 Bug 1371699 - Use of NonBlockingAsyncInputStream in our code base, r=froydnj 2017-10-03 07:20:18 +02:00
Ho-Pang Hsu
23754c0225 Bug 1395202 - Part 3: Create a testcase for nsICacheInfoChannel::cacheEntryId. r=michal, f=junior 2017-10-10 04:10:00 -04:00
Ho-Pang Hsu
4f7047edcb Bug 1395202 - Part 2: Expose CacheEntryId to nsICacheInfoChannel. r=michal, f=junior 2017-10-10 04:10:00 -04:00
Ho-Pang Hsu
432321ac7c Bug 1395202 - Part 1: Create nsICacheEntry::CacheEntryId. r=michal, f=junior,mayhemer 2017-10-10 04:09:00 -04:00
Nicholas Hurley
e1ff7a7d15 Bug 1409156 - Do not prefetch tracking resources. r=valentin
MozReview-Commit-ID: IKKHOLd2b4Y

--HG--
extra : rebase_source : 93c402435d67ed5cb0b2d84bc401ca6e058abd5a
2017-08-07 12:45:49 -07:00
Sylvestre Ledru
47e0a0230a Bug 1408751 - nsDeviceChannel::OpenContentStream: remove unused variable 'width' & 'height' r=dragana
MozReview-Commit-ID: II8mvYlvLZZ

--HG--
extra : rebase_source : 2c75a2aa8e18e1563f210aba8bef686e117793e0
2017-10-15 16:32:49 +02:00
Kris Maglione
b46bd8b6b0 Bug 1411817: Add do_AddRef overloads for nsCOMPtr<T> and nsRevocableEventPtr<T>. r=froydnj
MozReview-Commit-ID: gEU7whtNHc

--HG--
extra : rebase_source : 6763e6b31be8a3341f968eef057b756fbfe3cbbe
extra : amend_source : da6140fb0559d78b46e80e72e8b6768bf2364fb1
2017-10-25 19:46:50 -07:00
Randell Jesup
6eb5662c81 Bug 1400563: fix leaked nsTArray r=froyd on a CLOSED TREE 2017-10-26 11:55:22 -04:00
Ben Kelly
8430bcaa3d Bug 1400655 P1 Respect LOAD_CALL_CONTENT_SNIFFERS when a channel is intercepted by a ServiceWorker. r=valentin 2017-10-26 11:08:25 -04:00
Randell Jesup
b01ce04bf4 Bug 1400563: more DataChannelConnection shutdown cleanup r=drno 2017-10-26 10:29:37 -04:00
Attila Craciun
4d25367716 Merge mozilla-central to mozilla-inbound. r=merge a=merge CLOSED TREE 2017-10-26 12:34:39 +03:00
Chris Peterson
38fcf1fd08 Bug 1160368 - Part 2: Collect telemetry on how often first- and third-party cookies are set from HTTPS origins. r=jdm data-review=francois
This new COOKIE_SCHEME_HTTPS telemetry probe reports the same information as the COOKIE_SCHEME_SECURITY probe, but also categories cookies by whether they are set from an HTTP or HTTPS origin.

MozReview-Commit-ID: IWg8dycCzwq

--HG--
extra : source : 94708be3f00796680377b3235b78f7db70c34510
extra : intermediate-source : eaf32e92b13d54a8e8d70a7b8caf420800641d49
2017-02-16 18:58:48 -08:00
Chris Peterson
f38368c9cc Bug 1160368 - Part 1: Add flag to treat third-party cookies set over nonsecure HTTP as session cookies. r=jdm
"Nonsecure HTTP" here just means regular, not-HTTPS HTTP. It doesn't mean HTTPS without the `Secure` cookie flag. Honor the expiration time of third-party cookies set over HTTPS, whether or not they have the `Secure` cookie flag. If a third-party cookie is set over HTTPS and then later sent in nonsecure HTTP request (which is allowed for cookies without the `Secure` cookie flag), the cookie won't be turned into a session cookie unless the nonsecure HTTP response sets a new cookie value.

This feature is controlled by the pref "network.cookie.thirdparty.nonsecureSessionOnly".

MozReview-Commit-ID: HlCg21JyvNC

--HG--
rename : extensions/cookie/test/unit/test_cookies_thirdparty_session.js => extensions/cookie/test/unit/test_cookies_thirdparty_nonsecure_session.js
extra : source : d1be2e4265201efd3ee93e965ac68561f548fd05
extra : intermediate-source : f5b382fa1b70e30a907b1f10d74f8c0c6dff344e
2017-02-16 19:27:49 -08:00
Kris Maglione
f80c50c88d Bug 1402944: Part 2 - Move error string logic into ChannelWrapper. r=mixedpuppy,ehsan
MozReview-Commit-ID: 4rOeoliLTV7

--HG--
extra : rebase_source : 3e9b1151e8dbc812623ae2fd05895b7362e322f1
2017-09-22 18:43:18 -07:00
Sebastian Hengst
937b5d72b8 merge mozilla-central to autoland. r=merge a=merge 2017-09-25 12:02:51 +02:00
Amy Chung
e30f2f6227 Bug 1286858 - Data storage and interface changes for SameSite cookies. r=valentin 2017-09-25 01:27:04 +08:00
Chris Peterson
b98afa1d19 Bug 870698 - Part 11: Replace Insert(NS_LITERAL_STRING("")) with InsertLiteral(u""). r=erahm
The NS_LITERAL_STRING macro creates a temporary nsLiteralString to encapsulate the char16_t string literal and its length, but AssignLiteral() can determine the char16_t string literal's length at compile-time without nsLiteralString.

MozReview-Commit-ID: L9UE3gXHG4Q

--HG--
extra : source : 37d74bf745b23542251cc6b021d6aabb5ffadea1
extra : intermediate-source : 0402b4bd34c293b44c76de22418899420c8e405b
2017-09-07 18:08:18 -07:00
Chris Peterson
5698729243 Bug 870698 - Part 10: Replace Append(NS_LITERAL_STRING("")) with AppendLiteral(u""). r=erahm
The NS_LITERAL_STRING macro creates a temporary nsLiteralString to encapsulate the char16_t string literal and its length, but AssignLiteral() can determine the char16_t string literal's length at compile-time without nsLiteralString.

MozReview-Commit-ID: H9I6vNDMdIr

--HG--
extra : rebase_source : cf537a1f65af003c6c4f8919b925b0f305c1dd4d
extra : source : 13b89ce4e6a66c840f82a335c71f5a12938aba22
2017-09-07 18:32:54 -07:00
Chris Peterson
1ca3d5aa46 Bug 870698 - Part 8: Replace Equals(NS_LITERAL_CSTRING("")) with EqualsLiteral(""). r=erahm
The NS_LITERAL_CSTRING macro creates a temporary nsLiteralCString to encapsulate the string literal and its length, but AssignLiteral() can determine the string literal's length at compile-time without nsLiteralCString.

MozReview-Commit-ID: B5Y8KyExPQ8

--HG--
extra : rebase_source : e27b266c145daa5acd887e998c6d5b408101e1db
extra : source : 33f49977a33cbdb1c7127871b940eefccc018f65
2017-09-06 15:00:31 -07:00
Chris Peterson
98b2f2fcd6 Bug 870698 - Part 7: Replace Insert(NS_LITERAL_CSTRING("")) with InsertLiteral(""). r=erahm
The NS_LITERAL_CSTRING macro creates a temporary nsLiteralCString to encapsulate the string literal and its length, but AssignLiteral() can determine the string literal's length at compile-time without nsLiteralCString.

MozReview-Commit-ID: DbTW5Bhd9E1

--HG--
extra : rebase_source : b27f666e5ca832d814fb6846208474e1ec66e5f4
extra : source : 9ff4e11402a9a43ed90298a9c354b0164cf9414f
2017-09-07 18:15:42 -07:00
Chris Peterson
a6a56ed916 Bug 870698 - Part 6: Replace Append(NS_LITERAL_CSTRING("")) with AppendLiteral(""). r=erahm
The NS_LITERAL_CSTRING macro creates a temporary nsLiteralCString to encapsulate the string literal and its length, but AssignLiteral() can determine the string literal's length at compile-time without nsLiteralCString.

MozReview-Commit-ID: F750v6NN81s

--HG--
extra : rebase_source : 714dd78df0f4c33e23e5b117615bd8fd561674c5
extra : source : 742bda9e6b1ddaf34d09894204ad18ce798b79b7
2017-09-07 18:25:25 -07:00
Chris Peterson
a0c8081df4 Bug 870698 - Part 4: Replace Equals("") with EqualsLiteral(""). r=erahm
MozReview-Commit-ID: G1GhyvD29WK

--HG--
extra : rebase_source : 115842c37a40041bdca7b4e1ff0a5680b02ced15
extra : source : 90bfff9c01d80086cdc17637f310e898fea295ea
2017-09-06 01:13:45 -07:00
Chris Peterson
10073693ba Bug 870698 - Part 3: Replace Insert("") with InsertLiteral(""). r=erahm
MozReview-Commit-ID: 7ERQfcVAiRx

--HG--
extra : rebase_source : de006c4c32f91bf184d9197e920d546253657f82
extra : intermediate-source : 1e875e7bf42881fd1a104501ad379d9f1cdc3c33
extra : source : 9a43a6935a1ce9bd52020fd816cc6c1686aa8564
2017-09-05 12:41:31 -07:00
Chris Peterson
45aa2a8e8e Bug 870698 - Part 2: Replace Append("") with AppendLiteral(""). r=erahm
MozReview-Commit-ID: CrkIP4iHP1U

--HG--
extra : rebase_source : 5dc4e91a3f1860773c199f1abf3f66479218834a
extra : intermediate-source : ba51cc79847f2b43ba616f4a5d2bbc6958ca9f6d
extra : source : 1fda2fa990cc918c748ffa14fcc5dbe13fe3bdc3
2017-09-03 22:14:11 -07:00
Chris Peterson
9f4c1f5278 Bug 870698 - Part 1: Replace Assign("") with AssignLiteral(""). r=erahm
MozReview-Commit-ID: A0u9PP49OW3

--HG--
extra : rebase_source : 7d5286959f510eb4b7df1b7e32d5b9b58719c48b
extra : intermediate-source : f552b4a78236c42bc09030b3eb008725a3edb9c8
extra : source : 26ac4a1014f6661a70e3bf9f552407e12c2c3981
2017-09-03 22:12:56 -07:00
Shih-Chiang Chien
25a29bf7ad Bug 1396395 - Part 2, add test case. r=dragana
MozReview-Commit-ID: 95RPLxNix4W

--HG--
extra : rebase_source : e6b97e01f4c8afc81bf049e2914d93628008a4f2
2017-09-15 16:01:57 +08:00
Shih-Chiang Chien
da9b96697d Bug 1396395 - Part 1, resume input pump after callback finished. r=dragana
OnStartRequest callback chain is interrupted by add-on during the "http-on-modify-request" observer event.
Therefore, nsInputStreamPump think OnStartRequest is finished.  After resuming http channel, nsHttpChannel
asynchronously continue the OnStartRequest procedure and synchronously resume the nsInputStreamPump. Before
nsDocumentOpenInfo invoke the next OnStartRequest on the listener chain, sync XHR in web content is executed
on the call stack. This will spin main thread event queue and will eventually callback OnDataAvailable/OnStopRequest
on the same call stack.

nsHttpChannel should not resume the nsInputStreamPump before |mCallOnResume| is complete, to ensure that
no input stream event can interrupt the resumed call stack before it finished.

MozReview-Commit-ID: 6Q9EtMhcff9

--HG--
extra : rebase_source : 5685bacd9fbc95207a2a1349a8db66d53e3cc524
2017-09-13 18:34:04 +08:00
Thomas Nguyen
f29fa2e661 Bug 1356854 - Check mFD is not null before PR_Write r=mcmanus
MozReview-Commit-ID: INoTUvPpPrs

--HG--
extra : rebase_source : bb8f25d66c2f5fbaec2f344b69bb42c0ef38b7d2
2017-09-21 16:39:36 +08:00
Valentin Gosu
1b3f9ab5d6 Bug 1400001 - Use AwaitingCacheCallbacks when deciding if racing instead of mCacheAsyncOpenCalled r=michal
MozReview-Commit-ID: 5VRRXrkNo9Y

--HG--
extra : rebase_source : f4eb8349627f12ccf638f1d42c7c8a0aecb00fe7
2017-09-15 02:47:41 +02:00
Jonathan Kew
78a3e1848f Bug 1402048 - Remove the legacy non-IDNA2008 code path from nsIDNService, now that we always require ICU to build. r=valentin 2017-09-22 19:25:50 +01:00
Dragana Damjanovic
6944131868 Bug 1397686 - The streams that cannot do 0RTT data need to be put in list and added to mReadyForWrite when 0RTT is done. r=hurley 2017-09-22 09:09:57 +02:00
Wes Kocher
a7fe048680 Merge inbound to central, a=merge
MozReview-Commit-ID: E7k4xViLm4V
2017-09-21 17:03:29 -07:00
Kershaw Chang
56cdc97487 Bug 1247843 - Part 1: Add new property - contentRequestContextID. r=mconley, r=hurley 2017-09-20 20:08:00 -04:00
Valentin Gosu
7822c999e1 Bug 910207 - Disable preconnect when user certificates are installed r=keeler
MozReview-Commit-ID: 1vGPxDCAcQR

--HG--
extra : rebase_source : 3dda6f50ddbe1e03c7b7625c6039cb20896ef05e
2017-09-19 01:51:41 +02:00
Kris Maglione
63d03a767b Bug 1398646: Forbid sync DNS resolution on the main thread. r=valentin
MozReview-Commit-ID: A6mUDNSri2m

--HG--
extra : rebase_source : 43c58d61614e186b89523a301fd1d2d8bd99a503
extra : source : 963bf9d8573273894016e7082cb5f3fb85d80661
2017-09-10 19:13:42 -07:00
Wes Kocher
3baa8a7e6e Merge inbound to central, a=merge
MozReview-Commit-ID: 5B5W6AHKcCb
2017-09-19 14:49:11 -07:00
Joel Maher
50a371672c Bug 1370783 - Disable netwerk/test/browser/browser_child_resource.js on debug for frequent failures. r=me, a=test-only 2017-09-19 12:15:11 -04:00
Andrea Marchesini
fd7d739519 Bug 1401204 - Get rid of NS_BackgroundInputStream and NS_BackgroundOutputStream, r=valentin 2017-09-19 17:52:28 +02:00
Boris Zbarsky
203072cfe1 Bug 1401171 - Make nsIMultiplexInputStream not inherit from nsIInputStream. r=bkelly
This is a preexisting issue that makes nsMultiplexInputStream multiple-inherit
from nsIInputStream: once via nsIMultipartInputStream and once via
nsIAsyncInputStream.  This causes problems once we end up with more multiplex
streams that are async streams, because then some assingments to
nsCOMPtr<nsIInputStream> start asserting.  This patch just removes the footgun
by getting rid of the multiple inheritance.
2017-09-19 16:26:21 +02:00
Sebastian Hengst
7973633f84 Backed out changeset 3c9e25405f59 (bug 1401204) an request from baku for landing with wrong bug number. r=backout 2017-09-19 16:25:20 +02:00
Boris Zbarsky
5c70c28414 Bug 1401204 - Make nsIMultiplexInputStream not inherit from nsIInputStream. r=bkelly
This is a preexisting issue that makes nsMultiplexInputStream multiple-inherit
from nsIInputStream: once via nsIMultipartInputStream and once via
nsIAsyncInputStream.  This causes problems once we end up with more multiplex
streams that are async streams, because then some assingments to
nsCOMPtr<nsIInputStream> start asserting.  This patch just removes the footgun
by getting rid of the multiple inheritance.
2017-06-11 00:07:23 -04:00
Jonathan Kew
2a3883ef55 Bug 1399540 - Add some IDN testcases with mixed punycode and non-punycode labels. r=valentin 2017-09-16 11:50:08 +01:00
Jonathan Kew
eddd7a4f4e Bug 1399540 - patch 2 - Handle invalid punycode better in stringPrep to avoid mangling display of fake-punycode labels. r=valentin 2017-09-16 11:49:56 +01:00
Jonathan Kew
99ad73e474 Bug 1399540 - patch 1 - Failure to decode an individual label within the IDN should not block decoding of other valid punycode labels. r=valentin 2017-09-16 11:49:47 +01:00
Kris Maglione
400f2bdf9d Backed out changeset 963bf9d85732 (bug 1398646) for causing bug 1400288. r=backout
MozReview-Commit-ID: Ivc7RmGx0j5
2017-09-15 15:45:44 -07:00
Sebastian Hengst
220e7cecae merge mozilla-central to autoland. r=merge a=merge 2017-09-15 00:01:52 +02:00
Sebastian Hengst
71720207e1 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JHeyFz4rx1v
2017-09-14 23:58:56 +02:00
Ryan VanderMeulen
749fec75f0 Backed out changeset 4198b9d273b9 (bug 1399541) for causing bug 1399899. 2017-09-14 12:13:38 -04:00
Valentin Gosu
617da36cf0 Bug 1396307 - Set mCacheAsyncOpenCalled back to flase when AsyncOpenURI fails r=michal
MozReview-Commit-ID: VnwI3ERHVt

--HG--
extra : rebase_source : b0dd35d8dc246edef20c4d6cf220013131366b1e
2017-09-14 22:21:49 +02:00
Valentin Gosu
ec3cf55bec Bug 1396307 - Add null check in nsHttpChannel::OnAuthAvailable r=michal
MozReview-Commit-ID: L9zaroxJ72i

--HG--
extra : rebase_source : 4ae01e3889b5e1cd3708e9a1273b7e0eb79aca51
2017-09-14 21:50:15 +02:00
Jeff Gilbert
3c7d994631 Bug 1399280 - Use pair->Size() for nvFIFO::AddElement, like in RemoveElement. - r=nwgh
MozReview-Commit-ID: 7YvsmMKUF2
2017-09-13 17:57:13 -07:00
Valentin Gosu
1899623afe Bug 1399541 - Add assertion that we rcwn is enabled when mRaceCacheWithNetwork is true. r=michal
MozReview-Commit-ID: 8UDaIklOOmw
2017-09-13 18:41:45 +02:00
Valentin Gosu
8b26a0b9b1 Bug 1396307 - Make sure we only set mRaceCacheWithNetwork to true when the feature is enabled r=michal
MozReview-Commit-ID: FrLjfuExmYV

--HG--
extra : rebase_source : 21ec1409444b202fcb73aee8b8d04475c5179679
2017-09-06 10:24:01 +02:00
Michal Novotny
b77839cad7 Bug 1399802 - Race only when disk storage is used, r=valentin
Race only when we're going to read from the disk cache storage. Also skip racing if we're going to write to the offline cache, because we need the cache entry which would be ignored if network wins the race.
2017-09-14 14:37:23 +02:00
Andrea Marchesini
e4901e78cc Bug 1398556 - IPCBlobInputStream should call OnInputStreamReady() on the current thread if ::AsyncWait() is called without passing nsIEventTarget, r=smaug 2017-09-13 15:29:39 +02:00
Sebastian Hengst
49cb3c40cb Backed out changeset 0140b9418003 (bug 1398556) for asserting at dom/file/ipc/IPCBlobInputStream.cpp:555. r=backout on a CLOSED TREE 2017-09-13 16:57:39 +02:00
Andrea Marchesini
2961a9e492 Bug 1398556 - IPCBlobInputStream should call OnInputStreamReady() on the current thread if ::AsyncWait() is called without passing nsIEventTarget, r=smaug 2017-09-13 15:29:39 +02:00
Sebastian Hengst
7dd2b068b5 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-09-13 13:35:21 +02:00
Sebastian Hengst
e4a2f44531 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 9SALJlvWgoZ
2017-09-13 13:32:44 +02:00
Michal Novotny
e341d50aca Bug 1397593 - Assertion failure: !mOnStartRequestCalled (We should not call OnStartRequest twice) in HttpBaseChannel::DoNotifyListener(), r=valentin 2017-09-13 12:19:09 +02:00
Valentin Gosu
acc302eb58 Bug 1399300 - Backed out changeset a51cf9c048a1 (bug 910207) a=backout
MozReview-Commit-ID: 3l6B9n7VM1o
2017-09-13 10:51:18 +02:00
Sebastian Hengst
73e4408ece Backed out changeset e6f1fbbfdd1f (bug 1397593) for crashing e.g. in xpcshell's toolkit/mozapps/extensions/test/xpcshell/test_LightweightThemeManager.js on Windows. r=backout on a CLOSED TREE 2017-09-13 10:16:27 +02:00
Michal Novotny
6c04f54acc Bug 1397593 - Assertion failure: !mOnStartRequestCalled (We should not call OnStartRequest twice) in HttpBaseChannel::DoNotifyListener(), r=valentin 2017-09-13 08:41:01 +02:00