Commit Graph

15712 Commits

Author SHA1 Message Date
Noemi Erli
ed5a1a575c Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-01-19 12:15:59 +02:00
Michal Novotny
8af453aa79 Bug 1418028 - UBSan: null pointer passed to memcpy in CacheFileMetadata::WriteMetadata. r=honzab
--HG--
extra : amend_source : a88ab6e916c2d41696f6201e3d92cb6db2ce15c4
2018-01-18 07:50:00 -05:00
Prathiksha
29c497c760 Bug 1376235 - Change PermissionAvaliable to PermissionAvailable. r=johannh
MozReview-Commit-ID: JDrybb3WDlP

--HG--
extra : rebase_source : 260e5bb4d1400aff68f7bc6c30d7bcab8e0b0307
2018-01-17 15:57:48 +05:30
Dragana Damjanovic dd.mozilla@gmail.com
67b4ae20e8 Bug 1425097 - We do not to close h2 connection in case one stream gets 425. r=mcmanus
--HG--
extra : rebase_source : 68ee6e8b59821adc13a5fb6077af28c32e16c338
2018-01-17 06:58:00 +02:00
Dragana Damjanovic
ef300e6ca6 Bug 1426408 - Remove some code for the TCP fast open for Windows 10 that is not neede any more. r=mayhemer
--HG--
extra : rebase_source : 8ab4fbe254eaaca0595cfbcd6ba527810ecc5102
2017-12-20 08:39:00 +02:00
Sebastian Hengst
214d7e7953 Backed out changeset 070b636b242b (bug 1425097) for bustage at netwerk/protocol/http/nsHttpTransaction.cpp:1668: lvalue required as left operand of assignment. CLOSED TREE 2018-01-16 20:15:04 +02:00
Dragana Damjanovic dd.mozilla@gmail.com
5c20da8b6c Bug 1425097 - We do not to close h2 connection in case one stream gets 425. r=mcmanus
--HG--
extra : rebase_source : c4b2a5633fbe74a9dfa4be419f0444cbc3eda234
2018-01-15 08:20:00 -08:00
Honza Bambas
5d0de25dc2 Bug 1430197 - Remove the HTTP cache half-live experiment, r=michal 2018-01-12 11:51:00 +02:00
Dorel Luca
c5c7ddbb92 Merge inbound to mozilla-central r=merge a=merge 2018-01-16 06:05:59 +02:00
Kris Maglione
bef381375c Bug 1430508: Return 0 for ProcessId() when channel IPC is closed. r=dragana
There are some corner cases where we try to attach StreamFilter endpoints to a
channel after its IPC has been closed from from the other side, but request
listeners haven't been notified. This causes crashes in any of several places.

This patch changes nsHttpChannel::ProcessId to return 0 when IPC is closed, so
callers can detect that it's no longer possible to attach endpoints to it.

MozReview-Commit-ID: BZTOqezih0P

--HG--
extra : rebase_source : dfdb5bf7a11fccea51a1fbb161e688f10167da30
2018-01-14 17:40:09 -08:00
Chris Peterson
37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Kris Maglione
a75561bd62 Bug 1412726: Clean up XPCOM singleton constructor refcount handling. r=froydnj
This is a follow-up to bug 1409249. There are a lot of places where our
factory singleton constructors either don't correctly handle their returned
references being released by the component manager, or do handle it, but in
ways that are not obvious.

This patch handles a few places where we can sometimes wind up with dangling
singleton pointers, adds some explanatory comments and sanity check
assertions, and replaces some uses of manual refcounting with StaticRefPtr and
ClearOnShutdown.

There are still some places where we may wind up with odd behavior if the
first QI for a getService call fails. In those cases, we wind up destroying
the first instance of a service that we create, and re-creating a new one
later.

MozReview-Commit-ID: ANYndvd7aZx

--HG--
extra : rebase_source : acfb0611a028fef6b9387eb5d1d9e285782fbc7c
2017-10-29 16:02:40 -07:00
Shih-Chiang Chien
b8abf494f9 Bug 1401459 - always run HttpChannelChild::Release on main thread. r=mayhemer
--HG--
extra : rebase_source : 21705641833e1ad0cb0a3b45f8f0006d29246160
2018-01-11 10:40:29 +08:00
Dragana Damjanovic dd.mozilla@gmail.com
37608e7519 Bug 1429859 - Check mDoNotTryEarlyData in Do0RTT(). r=mcmanus
--HG--
extra : rebase_source : 799854532375d54765fd682cb9f648549b2c6b90
2018-01-11 10:17:00 +02:00
Ben Kelly
88cfd7461c Bug 1425965 P2 Add nsIConsoleReportCollector::FlushReportsToConsoleForServiceWorkerScope(). r=baku 2018-01-12 12:16:04 -05:00
Narcis Beleuzu
4de0807d09 Merge inbound to mozilla-central r=merge a=merge 2018-01-12 13:25:57 +02:00
Dragana Damjanovic
2dce8cd834 Bug 1429830 - Enable TFO is a cross-compiler is used.r=nwgh 2018-01-11 23:17:44 +01:00
Andrew Sutherland
2da7a3c221 Bug 1416879 - Part 3: (Also Bug 1418795) SyntheticDiversionListener should handle !mIPCOpen. r=bkelly
The SyntheticDiversionListener needs to handle the case where the IPC
connection is gone.  This patch avoids calling Send* methods which will
crash the content process if the actor has already been destroyed.
Additionally, OnDataAvailable will return an error in such a case so
that the caller can properly handle the error rather than continuing to
attempt to send data to a listener that doesn't care.  This latter
change is an artifact of a previous hack attempt to fix a related
diversion issue that is probably not required for this stack, but makes
sense as a fix, so I've left it in.

--HG--
extra : rebase_source : 44ee7941be7619a8532c5194eca88fb0ca6323f7
extra : source : 5453b8a58f0c2c28dc7c407c531c266972bff423
2018-01-04 13:59:13 -05:00
Andrew Sutherland
6684613c61 Bug 1416879 - Part 2: Allow for diversion cancellation and trigger for intercepted channels. r=bkelly, r=mayhemer
The diversion mechanism never expected to be dealing with data sourced
from the content process, but that's exactly what happens with
ServiceWorker-intercepted channels with the current child-intercept
situation (which is being fixed).

In order to allow timely cancellation of diverted intercepted
channels, there needs to be a way to relay to the HttpChannelChild
that it needs to be canceled so that the synthesized pump can be
canceled and diversion can be marked as complete.  This patch adds
such a mechanism to ADivertableParentChannel and PHttpChannel for the
exclusive use of InterceptedHttpChannel and then uses it.

--HG--
extra : rebase_source : db71e927bd1837c6a67f6d56df52cfbb7294df73
extra : source : d156f6b687e1cd8717bf813ab1b944e87b67ed5d
2018-01-04 18:38:07 -05:00
Andrew Sutherland
1b42d677f3 Bug 1416879 - Part 1: DivertComplete should only be sent at OnStopRequest for synthesized responses. r=bkelly
Diversion for intercepted channels with a synthesized response is a
special case.  It is not appropriate to send DivertComplete when
mEventQ has been drained, because we are not dealing with the usual
mEventQ-enqueued OnDataAvailable payloads that had been received over
the network and sent down to the child.  In this case, all the data
originates in the child and does not go through mEventQ.  As such,
the correct place to send DivertComplete is at OnStopComplete for the
synthesized response.

--HG--
extra : rebase_source : a4e1593d38629173b829014a3c316ad156094580
extra : source : 714d3942fb10a96e60e14c475e24e640b9ddd8cc
2018-01-04 18:56:46 -05:00
Nicholas Hurley
670ad53036 Bug 1367861 - enable throttling for http/2. r=mayhemer
This also fixes the bug that prevented throttled http/2 streams from
ever re-starting by calling TransactionHasDataToRecv.

MozReview-Commit-ID: 5dFotZGhQk9

--HG--
extra : rebase_source : 2ba35bef4e17d90fc2abe52958bb6459b052b7e7
2018-01-10 13:35:02 -08:00
Dragana Damjanovic dd.mozilla@gmail.com
88d0518368 Bug 1429426 - Disable TFO if pmls64.dll and rlls64.dll are detected. r=valentin 2018-01-11 15:10:12 +01:00
Gijs Kruitbosch
da58d0a580 Bug 1430237 - remove newSimpleNestedURI from nsINetUtil, r=mayhemer
MozReview-Commit-ID: 74RsNo60Kfh

--HG--
extra : rebase_source : ba3288d4bf71c5c1643cf19993fa6cbcd8f72e8f
2018-01-15 11:51:24 +00:00
Ciure Andrei
93d5417e33 Merge mozilla-central to mozilla-inbound. r=merge a=merge CLOSED TREE 2018-01-11 12:08:47 +02:00
Ciure Andrei
f7400ad72e Merge inbound to mozilla-central r=merge a=merge 2018-01-11 11:54:56 +02:00
Kate McKinley
e97980a95e Bug 1424917 - Remove support for HSTS Priming. r=mayhemer, r=ckerschb
This patch removes support and tests for HSTS priming from the tree.
2018-01-10 11:07:00 -05:00
Emilio Cobos Álvarez
671dccb84a Bug 1428589: Correctly handle expiring all the cookies in an entry. r=jdm
MozReview-Commit-ID: 6qaC9yclvP2
2018-01-11 06:07:38 +01:00
Andrew Swan
63c732760f Bug 1396399 - Clarify rules for applying activeTab permission to content scripts. r=kmag, r=bz
MozReview-Commit-ID: 9xPDX8Qk2iR
2017-11-04 21:06:20 -07:00
Dorel Luca
ccebfc1873 Merge mozilla-central to autoland r=merge 2018-01-11 00:03:38 +02:00
Shane Caraveo
29b0901e54 Bug 1418275 Fix timing of STS header processing for webextensions r=mayhemer
STS header checking was happening before http-on-examine-response which prevents
an observer from adding the STS headers to enforce STS.  This moves the header
processing to after the notification occurs.  In a webextension,
WebRequest.onHeadersReceived can now be used to inject STS and have that
recognized by HttpChannel.

MozReview-Commit-ID: KYZCSTBnZL7

--HG--
extra : rebase_source : 7a36fab9361e1da0223a4e63fe770228ea99538f
2018-01-10 13:21:08 -08:00
Valentin Gosu
c4e59fe243 Bug 1427373 - Convert nsHostResolver.mDB from PLDHashTable to nsRefPtrHashtable r=mayhemer
* Converts PLDHashTable mDB to nsRefPtrHashtable<nsGenericHashKey<nsHostKey>, nsHostRecord> mRecordDB
* Removes nsHostDBEnt and associated PLDHashTableOps

This patch makes the code a lot easier to understand, by simplifying the
ownership model. Now the hashtable holds RefPtr<nsHostRecord>, so it's
easier to follow the lifetime of each record.

MozReview-Commit-ID: IMavN8YSPSn

--HG--
extra : rebase_source : 3ff3135e2d9610577f15aaf307a62eec5ed3b47a
2018-01-07 23:22:01 +01:00
Valentin Gosu
c0d1211c67 Bug 1427373 - Use a refPtr for rec so that CompleteLookup doesn't need to release it r=mayhemer
MozReview-Commit-ID: 4LUxxJ13Bg3

--HG--
extra : rebase_source : d0e9316b9ee911f3d4a62a8de407176a50415cb2
2018-01-07 23:00:07 +01:00
Dragana Damjanovic
205fa0bf38 Bug 1429106 - Fix TFO telemetry. r=nwgh 2018-01-10 12:39:55 +01:00
Margareta Eliza Balazs
fe2caaa266 Merge inbound to mozilla-central r=merge a=merge 2018-01-09 11:52:55 +02:00
Bogdan Tara
cd1c3cc5dd Merge mozilla-central to autoland, r=merge a=merge on a CLOSED TREE 2018-01-09 00:16:46 +02:00
Honza Bambas
95b32effe1 Bug 1423550 - Lookup regula HTTP cache on appcache NETWORK namespace match, r=michal 2018-01-08 07:26:00 +02:00
Honza Bambas
d53e911aed Bug 1425301 - Progressively decrease the 6 seconds maximum quantum delay of tracker script tailing, r=dragana 2018-01-08 06:01:00 +02:00
Shih-Chiang Chien
e6a79fe88f Bug 1426751 - Prevent FlushQueue to be invoked on multiple threads simultaneously. r=mayhemer
This issue is triggered by off-main-thread ODA listener that return error cause from OnDataAvailable callback.
A CancelEvent will be prepend to event queue and trigger race condition between CompleteResume and EndForceEnqueueing.

The `mFlushing` is checked and set in separate critical sections, therefore two threads that executing MayFlushQueue
might both pass the `mFlushing` check and trying to call FlushQueue simultaneously.

The solution is to check and set `mFlushing` in single critical section, so we can guarantee that only one FlushQueue
can be executed at anytime.

In addition, resumption is postponed until no AutoEventEnqueuer is activated. Therefore, CompleteResume will only be
triggered while all the suspension requests and auto enqueue requests are finished.

MozReview-Commit-ID: HpxzgUqYm8C

--HG--
extra : rebase_source : 9be0d37bb4475a0817dafb6270585263160a9da1
2018-01-04 18:53:02 +08:00
Brindusan Cristian
f42618c99d Backed out 6 changesets (bug 1416879) for bc permafailures on windows on browser_multie10s_update.js r=backout a=backout
Backed out changeset 840a6e04bcea (bug 1416879)
Backed out changeset 994dc643a2ab (bug 1416879)
Backed out changeset 8e4fd74e7f5e (bug 1416879)
Backed out changeset 5453b8a58f0c (bug 1416879)
Backed out changeset d156f6b687e1 (bug 1416879)
Backed out changeset 714d3942fb10 (bug 1416879)
2018-01-07 11:55:44 +02:00
Andrew Sutherland
35d9749e9b Bug 1416879 - Part 3: (Also Bug 1418795) SyntheticDiversionListener should handle !mIPCOpen. r=bkelly
The SyntheticDiversionListener needs to handle the case where the IPC
connection is gone.  This patch avoids calling Send* methods which will
crash the content process if the actor has already been destroyed.
Additionally, OnDataAvailable will return an error in such a case so
that the caller can properly handle the error rather than continuing to
attempt to send data to a listener that doesn't care.  This latter
change is an artifact of a previous hack attempt to fix a related
diversion issue that is probably not required for this stack, but makes
sense as a fix, so I've left it in.

--HG--
extra : rebase_source : 824d4ab64e92ebb04d8d1ecd4df6d03a2cb37d2f
2018-01-04 13:59:13 -05:00
Andrew Sutherland
5272d9c40a Bug 1416879 - Part 2: Allow for diversion cancellation and trigger for intercepted channels. r=bkelly, r=mayhemer
The diversion mechanism never expected to be dealing with data sourced
from the content process, but that's exactly what happens with
ServiceWorker-intercepted channels with the current child-intercept
situation (which is being fixed).

In order to allow timely cancellation of diverted intercepted
channels, there needs to be a way to relay to the HttpChannelChild
that it needs to be canceled so that the synthesized pump can be
canceled and diversion can be marked as complete.  This patch adds
such a mechanism to ADivertableParentChannel and PHttpChannel for the
exclusive use of InterceptedHttpChannel and then uses it.

--HG--
extra : rebase_source : 59d3aa5e541d2a404c6320ae9fce03e7c9cd8b81
2018-01-04 18:38:07 -05:00
Andrew Sutherland
7f86d0ce4a Bug 1416879 - Part 1: DivertComplete should only be sent at OnStopRequest for synthesized responses. r=bkelly
Diversion for intercepted channels with a synthesized response is a
special case.  It is not appropriate to send DivertComplete when
mEventQ has been drained, because we are not dealing with the usual
mEventQ-enqueued OnDataAvailable payloads that had been received over
the network and sent down to the child.  In this case, all the data
originates in the child and does not go through mEventQ.  As such,
the correct place to send DivertComplete is at OnStopComplete for the
synthesized response.

--HG--
extra : rebase_source : 2209c25ad6f2b5655728d8dc07ef7f8b64df6ea6
2018-01-04 18:56:46 -05:00
Dragana Damjanovic
4b6b71262b Bug 1426710 - The telemetry on how often a backup connection wins should be histogram. r=mayhemer 2018-01-08 19:28:10 +01:00
Honza Bambas
bc1c741e25 Bug 1405446 - Connections created for urgent-start requests are of limits for non-urgent-start ones, r=dragana 2018-01-09 07:58:00 -05:00
Ben Kelly
41a01f019b Bug 1429542 Make HttpChannelChild::OverrideRunnable check for nullptr before using mNewChannel. r=asuth 2018-01-10 14:45:17 -05:00
Valentin Gosu
0203cc4abd Bug 1426501 - Change C++ code to use NS_MutateURI when changing URI r=mayhemer
MozReview-Commit-ID: 4VzZlhWrtSJ

--HG--
extra : rebase_source : 9c872dc14c8e5f03e6354ab76c8bf750a7e10260
2018-01-08 15:20:35 +01:00
Valentin Gosu
f943b98a02 Bug 1426501 - Change JS code to use nsIURIMutator instead of the nsIURI.spec setter r=mayhemer
MozReview-Commit-ID: FI6WrsQT2ke

--HG--
extra : rebase_source : 2b286c47c19ebd112a0c47fbe0a4c23bdb04755f
2018-01-08 15:20:29 +01:00
Valentin Gosu
7b63575817 Bug 1426501 - Change nsIURIMutator to call set spec on cloned URI if available r=mayhemer
Calling SetSpec on an nsIURI object doesn't reinitialize the object, meaning
it's not equivalent with creating a new URI with the same spec. While this
might be counter-intuitive we want to preserve existing behaviour for
the moment.
This change makes BaseURIMutator::InitFromSpec call SetSpec on the existing
cloned URI if available. Otherwise it creates a new one.

MozReview-Commit-ID: LuHVRhBItiP

--HG--
extra : rebase_source : fc7b64d01adcb7f2ac5bbd9cfc16dadb3c4939c9
2018-01-08 11:23:59 +01:00
Valentin Gosu
b2e06a6d9b Bug 1426501 - Add nsINetUtil.notImplemented() method that always throws r=mayhemer
MozReview-Commit-ID: Ij3M5Ydtlac

--HG--
extra : rebase_source : f95ea333bad7eeacf7fd753028ac4ead18e70eef
2018-01-08 11:23:53 +01:00
Kershaw Chang
318287a62a Bug 1413999 - Part4: Test case r=dragana
--HG--
extra : rebase_source : 748ccbc8a2d03be61a4ed9ac21187d044b0e81f2
2018-01-03 18:59:00 +02:00