Граф коммитов

6759 Коммитов

Автор SHA1 Сообщение Дата
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
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
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
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
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
Kershaw Chang 62a41d6974 Bug 1413999 - Part3: IPC part, send trailers to child process r=dragana
The aim of this patch is to send trailers to child process via SendOnStopRequest.

--HG--
extra : rebase_source : 1a5e16e140ef20cfe2e723c3800d7feeebd9a5af
2018-01-03 02:05:00 +02:00
Kershaw Chang 73d9823e67 Bug 1413999 Part2: Take http trailers from chunk decoder and add serverTiming attribute in nsITimedChannel r=dragana
This patch includes:
1. Save http trailers in the header array in chunk decoder.
2. Take trailers from chunk decoder in OnStopRequest().
3. Add serverTiming attribute in nsITimedChannel.
4. Parse server timing header when GetServerTiming() is called.

--HG--
extra : rebase_source : 77c92b8a31d3d7eebb33aea266888f944af33327
2018-01-03 02:04:00 +02:00
Kershaw Chang 39f697a80b Bug 1413999 - Part1: Parse Serve-Timing header r=dragana
1. Add a helper function Tokenize() which is able to handle quoted-string and quoted-pair.
2. Modify ParsedHeaderValueListList
 - Use Tokenize() to split string by ','.
3. Modify ParsedHeaderValueList
 - Use Tokenize() to split string by ';'.
 - Function ParseNameAndValue() is for getting name and value from the string containing '='.
4. Handle backslash escapes for quoted string.
5. Reuse ParsedHeaderValueListList to parse server-timing header.

--HG--
extra : rebase_source : 7802a1ae9a6410c4ea992b1197018c5a3f994fa0
2018-01-03 02:04:00 +02:00
Honza Bambas d7dde42948 Bug 1422467. r=michal 2017-12-21 14:39:42 -05:00
Dragana Damjanovic 7149091b44 Bug 1426474 - Turn on TFO only for Darwin 17.3 and later. r=hurley 2017-12-21 18:59:05 +01:00
Dragana Damjanovic 93626c6bec Bug 1426367 - Turn on TFO for Windows. r=hurley 2017-12-21 18:43:57 +01:00
Dragana Damjanovic 66a1074054 Bug 1426366 - Detect http transaction stalls with TFO. r=hurley 2017-12-21 18:32:28 +01:00
Eden Chuang 3fd3115e94 Bug 1423623 - Add telemetry for alternate data stream on service worker synthesized channels. r=bkelly, data-r=francois
1. Create a new telemetry scalar SW_ALTERNATIVE_BODY_USED_COUNT to count the
       number of the alternative body used in service worker synthesized channels.

    2. To report values of fetching related time of InterceptChannel according to
       the detail subresource type. Now subresource/script, subresource/other,
       subresource/image and subresource/stylesheet are provided, and keep using
       subresource for other types.
2017-12-15 14:35:44 +08:00
Dragana Damjanovic 45d67964d6 Bug 1422895 - TFO should be possible only on Windows 10 Fall Creators Update or later. r=mcmanus 2017-12-20 16:45:30 +01:00
Dragana Damjanovic 00a47a6f30 Bug 1422545 - Do not close connection between a httpChannelChild and its httpChannelParent if we need to divert to parent.r=mayhemer
If UnknowDecoder is involved and the received content is short we will know whether we need to divert to parent only after OnStartRequest of the listener chain is called. Therefore do not do cleanup if we detect diversion.
2017-12-20 16:13:36 +01:00
Dragana Damjanovic 34afbed5d9 Bug 1402811 - Collect telemetry on how often a backup connection wins. r=mcmanus 2017-12-20 15:56:28 +01:00
Dragana Damjanovic 266c2b2aea Bug 1402879 - Make small changes to TFO: telemetry and use of backup socket that already has started. r-mcmanus 2017-12-20 15:40:07 +01:00
Amy Chung d0eb2b7593 Bug 1413512 -- Added a telemtry for counting of the HTTP redirection that triggered by top-level document or by subresource. r=schien data=francois 2017-12-15 10:50:19 -06:00
Dragana Damjanovic 07543200e4 Bug 1425156 - Fix bug in the http-auth dialog blocking. r=ckerschb 2017-12-14 20:22:56 +01:00
Dragana Damjanovic 220fd9a72a Bug 1424915 - Close a httpTransaction from a http2session with the right error code if the error code is NS_BINDING_RETARGETED. Otherwise the transaction will be restarted twice. r=mcmanus 2017-12-14 10:35:54 +01:00
Cosmin Sabou b0098afaea Merge mozilla-inbound to mozilla-central. r=merge a=merge 2017-12-13 12:14:29 +02:00
Andrea Marchesini 5f1be317f0 Bug 1421094 - nsIUploadChannel2.cloneUploadStream returns the length of the stream, r=smaug 2017-12-12 18:38:19 -06:00
Tom Tung f268a3c7c9 Bug 1420672 - P1: Propagate the uri reference to the redirect uri if the redirect uri doesn't have one. r=beklly
--HG--
extra : rebase_source : 5c2d137a03118b932631bbb52d640f34e269e86f
2017-12-08 15:42:30 +08:00
Andrea Marchesini badd489870 Bug 1424808 - Get rid of isFileStream in nsHttpChannel.cpp, r=valentin 2017-12-12 06:01:18 -06:00
Dragana Damjanovic 86a9ddb711 Bug 1409449 - Do not show auth-dialog for triggeringPrincipal==SystemPrincipal. r=ckerschb r=valentin r=francois 2017-12-12 10:34:12 +01:00
Margareta Eliza Balazs c4027ebd8f Merge mozilla-central to autoland. r=merge a=merge CLOSED TREE 2017-12-13 00:04:54 +02:00
Gurzau Raul 15f8898e50 Merge mozilla-central to autoland. r=merge a=merge CLOSED TREE 2017-12-09 00:56:50 +02:00
Gurzau Raul 91d3bc0100 Merge inbound to mozilla-central r=merge a=merge 2017-12-09 00:36:15 +02:00
Honza Bambas 1ee6257bc3 Bug 1386746 - Throttle HTTP response by allowing only small amount of data to read periodically, r=mcmanus 2017-11-28 05:37:00 +02:00
Shane Caraveo 76ee06b331 Bug 1149250 add support for https upgrades from webextensions, r=bz,mayhemer,rpl
MozReview-Commit-ID: ChIs2Q6bgEn

--HG--
extra : rebase_source : 942d6ee111df39fdd19d1d035e8eefa9280430f3
2017-12-08 12:12:37 -08:00
Patrick McManus dc7b5677f7 Bug 1411316 - necko api for cancelling all transactions r=dragana
test by: :kershaw

MozReview-Commit-ID: BwjsDMiEGZY

--HG--
extra : rebase_source : 5f2bdc49295d19179e26f9c72204e1d8a9fb698a
2017-10-24 09:17:02 -07:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Junior Hsu 344e2267f3 Bug 1419658 - let Basic http auth support ISO-8859-1 user/password, r=honzab
--HG--
extra : rebase_source : a3fdf8a70281775961277a0bcbf0645291f7b2b3
2017-12-07 01:31:00 +02:00
Dragana Damjanovic 6faa3298a5 Bug 1423522 - We should not block http-authentication prompts for proxies. r=ckerschb 2017-12-06 14:13:32 +01:00
Tiberius Oros be4fc858c5 Merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-12-06 12:35:04 +02:00
Gurzau Raul f5f1c3f294 Merge inbound to mozilla-central r=merge a=merge 2017-12-06 11:53:55 +02:00
Valentin Gosu 5a83d2bc0b Bug 1420954 - Make nsIURIMutator setters return nsIURIMutator so we can chain setters r=bagder
MozReview-Commit-ID: 53BD91hB2yi

--HG--
extra : rebase_source : 3c4f5b9ad8820353ae108b982026048dbf599d95
2017-12-05 02:35:21 +01:00
Honza Bambas 03b39896a0 Bug 1340197 - Don't wait for concurrent HTTP cache entry when the depending load is a top-level navigation. r=michal 2017-11-27 07:26:00 -05:00
Bogdan Tara ebe0a1a20c Merge inbound to mozilla-central r=merge a=merge 2017-12-04 22:20:49 +02:00
Michal Novotny 4e89b320f9 Bug 1394564 - Delete current outgoing message when PrimeNewOutgoingMessage fails. r=mcmanus
--HG--
extra : amend_source : 6ac45c6b007dac89195529a2e57ccfbd7ca88b8f
2017-11-22 05:17:00 -05:00
Honza Bambas 4eab23cce4 Bug 1411632 - Introduce onload and DOMContentLoaded telemetry for active tab and network optimization. r=valentin, r=francois 2017-12-02 18:13:43 -05:00
Junior Hsu 61807cdb5d Bug 1420334 - protect timestamp setting in a critical section, r=michal 2017-11-30 19:45:00 +02:00
Jonathan Watt b02fcd6df0 Bug 1180145, part 1 - Add a 'reportResourceTiming' member to the nsITimedChannel interface. r=mayhemer
MozReview-Commit-ID: 3poTmHWKs4K
2017-11-07 15:58:31 +00:00
Eden Chuang 7f3b4d6b1a Bug 1350359 - Part 4: Fix a crash caused by off-main-thread destruction of a HttpChannelChild. r=bkelly
Setting the InternalResponse's mCacheInfoChannel while needed, to avoid
    keeping unnecessary nsICacheInfoChannel alive.

--HG--
extra : histedit_source : 39f9339b69db52b0278495d5247bc99ffd1d8f79
2017-12-04 14:39:26 +08:00
Eden Chuang 2f08862cf1 Bug 1350359 - Part 3: Place the alternative data to the InterceptedChannel. r=bkelly 2017-12-04 14:39:21 +08:00
Eden Chuang 7211e8c25c Bug 1350359 - Part 1: Set alternative data type from InterceptedChannel to InternalRequest. r=bkelly 2017-12-04 14:39:10 +08:00
Francois Marier 5d8fa6f351 Bug 446344 - Implement Origin header CSRF mitigation. r=ckerschb,dragana
MozReview-Commit-ID: EZpGo0UfmUP

--HG--
extra : rebase_source : dce83c8314148c104e47ae322c4d578e96986ea3
extra : source : d4747fd86a331aed7b524b509f915f0c9dd6044f
2017-11-24 17:35:05 -08:00
Honza Bambas be74fa61ca Bug 1416682 - Don't allow writing alt-data to HTTP cache entry when the loading channel has failed to release the entry, r=michal 2017-12-01 11:01:00 +02:00
Honza Bambas 3fa9ca21fd Bug 1416682 - Add nsICacheEntry.drop() to explicitly release HTTP cache entries from channels to avoid logical deadlocks, r=michal 2017-11-30 12:03:00 +02:00
Tom Tung afa535333a Bug 1222008 - P1: Propagate the URLs from respondWith() if the response's URL is different from the request's. r=bkelly
--HG--
extra : rebase_source : 97bc74f18e734673ab598925410c8b284c4aaba8
2017-11-01 15:45:35 +08:00
Bogdan Tara 7d5d1bc25f Backed out 1 changesets (bug 1340197) for failing reftests on /tests/dom/base/crashtests/504224.html r=backout a=backout on a CLOSED TREE
Backed out changeset 42fc2739a333 (bug 1340197)
2017-11-30 00:58:17 +02:00
Nika Layzell d004fe115e Bug 1415158 - Don't notify ContentParent of a load if our IPC channel is closed. r=billm
MozReview-Commit-ID: 4HBIalVCfno
2017-11-28 15:30:56 -05:00
Honza Bambas 794a11e78e Bug 1340197 - Don't wait for concurrent HTTP cache entry when the depending load is a top-level navigation. r=michal 2017-11-27 07:26:00 -05:00
Brindusan Cristian 9f3bd430c2 Merge inbound to mozilla-central a=merge r=merge 2017-11-28 11:50:57 +02:00
Dragana Damjanovic 3de66b952d Bug 1404069 - Revert bug 1363372. r=mayhemer 2017-11-27 21:12:31 +01:00
Andrea Marchesini 442a9cd5f0 Bug 1419382 - Moving ownership of nsIInputStream when using netUtil functions - part 4 - Get rid of NS_NewAsyncStreamCopier, r=smaug 2017-11-22 11:19:25 +01:00
Andrea Marchesini 1fd1731f81 Bug 1419382 - Moving ownership of nsIInputStream when using netUtil functions - part 3 - NS_NewInputStreamPump, r=smaug 2017-11-22 11:18:57 +01:00
Andrea Marchesini 8a7dedba69 Bug 1419382 - Moving ownership of nsIInputStream when using netUtil functions - part 1 - NS_NewInputStreamChannelInternal, r=smaug 2017-11-22 11:18:18 +01:00
Valentin Gosu d2d8524673 Bug 1415205 - Add nsIURIMutator impls for all objects implementing nsIURI r=bagder
This also changes URIUtils.cpp:DeserializeURI() to use the mutator to instantiate new URIs, instead of using their default constructor.

MozReview-Commit-ID: JQOvIquuQAP

--HG--
extra : rebase_source : e146624c5ae423f7f69a738aaaafaa55dd0940d9
2017-11-20 17:11:30 +01:00
Nika Layzell a7666fd8fe Bug 1418048 - Add a callback-based Send API to async returning IPDL methods, r=billm
Currently if you write an async IPDL method which has a return value, we expose
a SendXXX method which returns a MozPromise. This MozPromise can then be
->Then-ed to run code when it is resolved or rejected.

Unfortunately, using this API loses ordering guarantees which IPDL provides.
MozPromise::Then takes an event target, which the resolve runnable is dispatched
to. This means that the resolve callback's code doesn't have any ordering
guarantees relative to the processing of other IPC messages coming over the same
protocol.

This adds a new overload to SendXXX with two additional arguments, a lambda
callback which is called if the call succeeds, and a lambda callback which is
called if the call fails. These will be called in order with other IPC messages
sent over the same protocol.

MozReview-Commit-ID: FZHJJaSDoZy
2017-11-20 17:55:32 -05:00
Johann Hofmann d28b4dd837 Bug 1374574 - Remove the FlyWeb service and DOM interfaces. r=bz,djvj
MozReview-Commit-ID: 4hp9pLbMh4R

--HG--
extra : rebase_source : 82f417640211ede4fd7aa290c1f2609b07f38025
2017-11-22 15:00:10 +01:00
Thomas Nguyen 5bd3a1a2c6 Bug 1416344 - refactor computing referrer policy and remove uninitilized maybe value r=valentin
MozReview-Commit-ID: 7VoRaUSE096

--HG--
extra : rebase_source : 2c0aa81b5751fe187494df75e6d853b64f5b9b47
2017-11-13 19:23:47 +08:00
Chris Peterson feb58d9d37 Bug 1416164 - Replace NS_NOTYETIMPLEMENTED with MOZ_ASSERT_UNREACHABLE. r=froydnj
MozReview-Commit-ID: B5TZB3v52wY

--HG--
extra : rebase_source : 56bef4eead24901191f190e31d2841710097cdcf
2017-10-25 00:37:02 -07:00
Geoff Brown cbb956e0c3 Bug 1407679 - Merge nsIIOService and nsIIOService2; r=nwgh 2017-11-10 07:03:36 -07:00
Andrea Marchesini 6fd88f7ffb Bug 1415081 - part 3 - WebSocketChannel cannot use ::Available() to know the size of a nsIAsyncInputStream, r=smaug 2017-11-09 11:18:08 +01:00
Nicholas Hurley 52ce8728f8 Backout e15196e25f9e for causing bug 1415387 2017-11-08 10:30:58 -08:00
Margareta Eliza Balazs fe45ae3748 Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE 2017-11-08 00:08:26 +02:00
Nicholas Hurley 29bf3169ae Bug 1409570 - Ensure a pushed stream knows we've reached EOS. r=mcmanus
Previously, if a pushed stream was ended with a padding-only DATA frame
with the FIN bit set, and that stream didn't have a Content-Length,
there would be no way of knowing that the stream was finished. Now we
force-mark the push as complete if we hit a padding-only DATA frame with
the FIN bit set.

MozReview-Commit-ID: 7tk8x2FNgSj

--HG--
extra : rebase_source : b95f635b4bb0b4743cf81e888a455365ef561c22
2017-10-18 12:34:42 -07:00
Nicholas Hurley b45caf2d01 Bug 1402014 - Don't (try to) write to the network when we're already closed. r=mcmanus
MozReview-Commit-ID: CkGuzlzDToj
2017-11-07 07:57:37 -08:00
Chris H-C 4bf8e88346 bug 1413258 - Collect SSL Telemetry on all channels r=mcmanus
Ever since bug 1340021 we were supposed to be collecting *_IS_SSL probes on
release, but the code in nsHttpChannel prevented it from happening.

MozReview-Commit-ID: IdU4Gppos6E

--HG--
extra : rebase_source : d8260883287eea1b6a651f1f89dcca9d06fd6cce
2017-11-03 15:06:59 -04:00
Ben Kelly 8a04f60def Bug 1412015 P3 Check ResetInterception result and CancelInterception if a failure occurs. r=asuth 2017-10-30 10:30:01 -04:00
Ben Kelly 1fe291d902 Bug 1412015 P2 Create a shared method in HttpBaseChannel to check the redirection limit. r=valentin 2017-10-30 10:30:01 -04:00
Ben Kelly 871bdfbb8b Bug 1412015 P1 Propagate mRedirectCount and mInternalRedirectCount across all redirects. r=valentin 2017-10-30 10:30:01 -04:00
Nicholas Nethercote 9252435548 Bug 1410794 (attempt 2) - Change some |string| occurrences in nsIPrefBranch.idl to |ACString|. r=erahm.
This makes the code nicer. In particular, it removes many getter_Copies()
calls. The patch also converts a lot of nsCStrings to nsAutoCString, which will
avoid heap allocation in the common case.

The patch also renames PREF_CopyCharPref() as PREF_GetCStringPref(), because
it's actually getting a string, not a char, and that matches the existing
GetCString() and GetDefaultCString() methods. Correspondingly, it also renames
PREF_SetCharPref() as PREF_SetCStringPref().

The |aPrefName| arguments in nsIPrefBranch.idl remain as |string| because they
almost always involve passing in C string literals, and passing "foo" is much
nicer than passing NS_LITERAL_CSTRING("foo").

It's worth noting that early versions of this patch used |AUTF8String| instead
of |ACString|. But it turns out that libpref stores prefs internally as Latin1.
And |ACString| is compatible with Latin1 but |AUTF8String| isn't, because
non-ASCII Latin1 strings are not valid UTF-8!

MozReview-Commit-ID: D3f7a1Vl1oE

--HG--
extra : rebase_source : e6e4b15d6d210cfd93686f96400281f02bd1d06b
2017-10-27 10:30:33 +11:00
Valentin Gosu 3680a69516 Bug 1408990 - Only add the entry to the performance object if the loading document's principal is the same as the triggering principal. r=bz, r=dragana
MozReview-Commit-ID: 7o8XKHioP1p
2017-10-28 00:15:01 +02:00
Sebastian Hengst 831f2ed98f merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: oIdBL7fmlE
2017-10-28 10:31:58 +02:00
Liang-Heng Chen 3cf13fc905 Bug 1410257 - make non-connection-based connections restartable; r=mayhemer
MozReview-Commit-ID: 1hEk7mT6mzZ

--HG--
extra : rebase_source : 4c7507adb820b1760309fc1cfb1210cdf03c2d6e
2017-10-26 14:23:05 +08:00
Ben Kelly 1d874e8c70 Bug 1411528 Clear the intercept listening when synthesizing a redirect in HttpChannelChild. r=asuth 2017-10-27 16:11:57 -04:00
Dragana Damjanovic 63a20964af Bug 1412260 - Initialize mFastOpenStatus in NullHttpTransaction. r=bagder 2017-10-27 14:05:31 +02:00
Dragana Damjanovic b10887c6ac Bug 1406908 - Implement 425 (Too Early). r=mcmanus 2017-10-27 12:17:56 +02:00
Phil Ringnalda 81afb7d3f2 Backed out changeset 6e2c105f5730 (bug 1402014) for marionette, talos, and dom/push/ crashes @ mozilla::net::Http2Session::ReadSegmentsAgain
MozReview-Commit-ID: 4mZXcBAma9d
2017-10-26 19:22:08 -07:00
Nicholas Hurley 139e43e0fd Bug 1402014 - Don't (try to) write to the network when we're already closed. r=mcmanus
MozReview-Commit-ID: CkGuzlzDToj

--HG--
extra : rebase_source : 0992bb22b01ce6d80e0e11b66bf14bb072be453c
2017-10-26 19:05:37 -04:00
Sebastian Hengst d10e26c913 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-10-27 00:00:25 +02:00
Valentin Gosu 996793e8e8 Bug 1411697 - Make sure to SendDocumentChannelCleanup even when mPreferredCachedAltDataType is set r=michal
MozReview-Commit-ID: ApXNqS9tcfh

--HG--
extra : rebase_source : 6ef619331af3f3dd3424c5ac932a2c828bd9d50f
2017-10-26 15:54:37 +02:00
Patrick McManus f99705311c Bug 1409858 - H2 CONNECT Tunnel Marked Plaintext Too Late r=nwgh
MozReview-Commit-ID: IjuYDuvufRd

--HG--
extra : rebase_source : ab7773dc015c31d6ba1eb8c933efc79c38b29d06
2017-10-20 13:39:49 -04:00
Sebastian Hengst c84fe67114 Backed out 2 changesets (bug 1406908) for failing own xpcshell test. r=backout
Backed out changeset 6941e33afc7d (bug 1406908)
Backed out changeset 291c46b79fa2 (bug 1406908)
2017-10-25 17:39:15 +02:00
Phil Ringnalda e4524a80b9 Backed out changeset fd0492c07da0 (bug 1409449) for browser-chrome, xpcshell and marionette bustage
CLOSED TREE

MozReview-Commit-ID: IcOEJ0l1yeJ
2017-10-25 07:38:39 -07:00
Dragana Damjanovic 79e995a437 Bug 1406908 - Implement 425 (Too Early). r=mcmanus, r=mayhemer 2017-10-19 00:06:00 -04:00
Dragana Damjanovic dd.mozilla@gmail.com 026c72f278 Bug 1410147 - On MacOS HAS_CONNECTX should be set for Darwin version greater than and equal 15. r=bagder 2017-10-19 09:45:00 -04:00
Dragana Damjanovic 7120f32f23 Bug 1409449 - Do not show auth-dialog for triggeringPrincipal==SystemPrincipal. r=ckerschb, r=valentin, r=francois 2017-10-25 08:54:31 -04:00
Phil Ringnalda 93456fb0f4 Backed out changeset 3d0093f961ee (bug 1410794) for Mac plugin crashes and Android test_worker_interfaces.html failures
MozReview-Commit-ID: 20UosHyIr0t
2017-10-24 22:46:36 -07:00
Nicholas Nethercote a861772b10 Bug 1410794 - Change some |string| occurrences in nsIPrefBranch.idl to |ACString|. r=erahm.
This makes the code nicer. In particular, it removes many getter_Copies()
calls. The patch also converts a lot of nsCStrings to nsAutoCString, which will
avoid heap allocation in the common case.

The patch also renames PREF_CopyCharPref() as PREF_GetCStringPref(), because
it's actually getting a string, not a char, and that matches the existing
GetCString() and GetDefaultCString() methods. Correspondingly, it also renames
PREF_SetCharPref() as PREF_SetCStringPref().

The |aPrefName| arguments in nsIPrefBranch.idl remain as |string| because they
almost always involve passing in C string literals, and passing "foo" is much
nicer than passing NS_LITERAL_CSTRING("foo").

It's worth noting that early versions of this patch used |AUTF8String| instead
of |ACString|. But it turns out that libpref stores prefs internally as Latin1.
And |ACString| is compatible with Latin1 but |AUTF8String| isn't, because
non-ASCII Latin1 strings are not valid UTF-8!

--HG--
extra : rebase_source : 725ccf57943283a60ef8c9d654afe4515b4089f8
2017-10-25 10:22:38 +11:00
Andrea Marchesini be83c65dce Bug 1408333 Get rid of nsIIPCBackgroundChildCreateCallback - part 17 - HttpBackgroundChannel, r=asuth 2017-10-24 12:02:41 +02:00
Sebastian Hengst af53b8aad8 merge mozilla-central to autoland. r=merge a=merge 2017-10-23 23:52:54 +02:00
Jeff Hemphill e74e880a6c Bug 1403802: Port nsHttpHandler::PrepareAcceptLanguages over to Rust; r=valentin,froydnj 2017-10-22 11:27:59 -07: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
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
Sebastian Hengst 8e8a8276cd Backed out changeset 84cb594525ad (bug 1400655) for eslint failure in devtools/client/jsonview/test/browser_jsonview_serviceworker.js. r=backout
--HG--
extra : rebase_source : b47d28eed6fb93bcefb3543872816585e59759f9
2017-10-26 00:24:57 +02:00
Ben Kelly 61ffdf4130 Bug 1400655 P1 Respect LOAD_CALL_CONTENT_SNIFFERS when a channel is intercepted by a ServiceWorker. r=valentin 2017-10-25 17:32:04 -04:00
Andrea Marchesini 6626e900f9 Bug 1409327 - NS_NewBufferedInputStream should take the ownership of the inputStream, r=smaug 2017-10-19 11:39:30 +02:00
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 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 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
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
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
Ho-Pang Hsu 24a4dd8501 Bug 1395202 - Part 2: Expose CacheEntryId to nsICacheInfoChannel. r=michal, f=junior 2017-10-12 02:25: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
Ryan VanderMeulen 0dcd727f08 Merge m-c to autoland. a=merge 2017-10-11 17:55:13 -04: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
Ben Kelly 7e75d68ef3 Bug 1407186 P1 Fix InterceptedHttpChannel::AsyncOpen() error handling. r=asuth 2017-10-11 11:23:46 -07: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
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 b6ccfad07b Backed out changeset 92e3c67a3872 (bug 1395202) 2017-10-10 15:42:13 +02: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
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
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
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
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 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 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
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
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
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
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
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
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
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
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
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
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
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
Wes Kocher 3baa8a7e6e Merge inbound to central, a=merge
MozReview-Commit-ID: 5B5W6AHKcCb
2017-09-19 14:49:11 -07: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
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
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
haftandilian@mozilla.com 30f3ee0f31 Bug 1397257 - [Windows] Awesome Screenshot removing error for a second uninstallation. r=jimm
Fix circular dependency created when encountering a path to a nonexistent JAR
inner file.

Change cache JAR loads to not use ExtensionStreamGetter, instead call the JAR
channel's AsyncOpen2 method directly in the SimpleChannel callback.
Remove the code to handle cached JAR loads from ExtensionStreamGetter.

MozReview-Commit-ID: Kmry02eLYU1

--HG--
extra : rebase_source : 2d750b393b77e23f6ec4e20c322214611f5daea7
2017-09-07 17:34:18 -07:00
Kershaw Chang fcc1afee27 Bug 1398671 - Call AsyncAbort when canceling a tail request. r=hurley
When a tail request is canceled, neither mCachePump nor mTransactionPump was created. That means we have to call AsyncAbort to make sure that OnStopRequest() will be called and the request will be removed from the load group.
2017-09-12 08:38:00 -04:00
Michal Novotny c6167ee19b Bug 1398847 - Enabling RCWN causes tp6_facebook regression, r=valentin
For some reason, triggering network directly from MaybeRaceCacheWithNetwork() causes performance regression of tp6_facebook tests. This patch changes it so that an event is posted instead.
The patch also adds network.http.rcwn.min_wait_before_racing_ms preference which can be used by users to avoid immediate racing.
2017-09-11 22:16:13 +02:00
Honza Bambas 43860c7a61 Bug 910207 - Prevent client certificate pop-up coming from a speculative connection, r=dkeeler
MozReview-Commit-ID: IHKzHwsJUiQ
2017-09-01 10:42:00 +02:00
Sebastian Hengst a94fa43e25 Backed out changeset 9c00078ce6ab (bug 910207) for eslint failure at browser/base/content/test/urlbar/browser_urlbar_search_no_speculative_connect_with_client_cert.js:48: Expected method shorthand. r=backout 2017-09-08 20:42:07 +02:00
Honza Bambas c307957a65 Bug 910207 - Prevent client certificate pop-up coming from a speculative connection, r=dkeeler
MozReview-Commit-ID: CtNPV9kFqJM
2017-09-01 10:42:00 +02:00
Andrea Marchesini 3ccb9d2674 Bug 1397635 - Support for non-seekable stream in HTTP connection, r=bagder 2017-09-08 16:06:26 +02:00
Nicholas Hurley 7b5b9fb2da Bug 1397621 - Ensure we use the proper default port for origin matching with h2 pushes. r=mcmanus
MozReview-Commit-ID: AunviQkOjJO

--HG--
extra : rebase_source : 8355da8162e3d056527fa62fda5d2c1b71403419
2017-09-18 16:09:57 -07:00
Kris Maglione 058f9fb930 Bug 1255894: Part 10 - Move StreamFilterParent to necko child process. r=billm,dragana
MozReview-Commit-ID: 4JKUC7x3QgN

--HG--
extra : rebase_source : ec1bcdc9d89b264df65b0ec1096921a4fc105f30
2017-09-07 17:28:27 -07:00
Kris Maglione c86bc6b1ea Bug 1396676: Return already_AddRefed from cookie service GetSingleton() methods. r=jdm
These methods return an addrefed raw pointer, which makes them easy to use in
ways that cause leaks. If they're to continue returning an addrefed pointer,
they should explicitly return an already_AddRefed.

This also switches to StaticRefPtr with ClearOnShutdown for the cached
pointers for the sake of sanity.

MozReview-Commit-ID: D0lDpU8Hqug

--HG--
extra : rebase_source : 7b199070805fc0472eaf8409932517700ed23d49
2017-09-04 15:05:10 -07:00
Ethan d20c7d929c Bug 1393283 - Use the last ESR version as the spoofed Firefox version. r=tihuang, r=mcmanus 2017-09-01 17:29:44 +08:00
Sebastian Hengst a17af05f6f merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: L5exd68pNSG
2017-09-05 11:40:49 +02:00
Haik Aftandilian 760abe9af4 Bug 1395898 - Awesome Screenshot webextension does not work. r=jimm
Fix ExtensionProtocolHandler::GetAsync() to handle failures returned
from AsyncOpen2() for cached JAR resources.

Don't call SetupEventTarget() in the cached JAR ExtensionStreamGetter
constructor because the event target is not needed and calling
SetupEventTarget() triggers a debug mode warning from
nsContentUtils::GetEventTargetByLoadInfo().

MozReview-Commit-ID: KjDsPNQWlwU

--HG--
extra : rebase_source : d44e8a1cdf358f364156a3dc2ac6a428b57d5e32
2017-09-02 21:56:07 -07:00
Kershaw Chang e8dd9540ef Bug 1395472 - Don't move background transactions' streams to background group when the pref is off. r=hurley 2017-09-03 23:55:00 -04:00
Henri Sivonen d2b0cdbc9c Bug 1395527 part 2 - Delegate IsASCII and IsUTF8 to encoding_rs. r=froydnj
MozReview-Commit-ID: 49AGBPjW4Ca

--HG--
extra : rebase_source : 78dc1b549c97e5e4fb0dc625acdab23806b3e941
2017-09-01 11:53:31 +03:00
Honza Bambas 1d0de9b6b3 Bug 1394369 - Add calling script name + line LOG to HttpChannelChild::AsyncOpen. r=mcmanus 2017-08-28 04:09:00 -04:00
Andrea Marchesini 74a5faef65 Bug 1395140 - Implement "http-on-stop-request" notification, r=mayhemer 2017-09-01 11:55:37 +02:00
Kris Maglione 6bad4f8ef7 Bug 1366511: Part 3 - Add mozilla::ToResult() to convert other result types to equivalent Result. r=nbp,ehsan
Also adds a mozilla/ResultExtensions.h header to define the appropriate
conversion functions for nsresult and PRResult. This is in a separate header
since those types are not available in Spidermonkey, and this is the pattern
other *Extensions.h headers follow.

Also removes equivalent NS_TRY macros and WrapNSResult inlines that served the
same purpose in existing code, and are no longer necessary.

MozReview-Commit-ID: A85PCAeyWhx

--HG--
extra : rebase_source : a5988ff770888f901dd0798e7717bcf6254460cd
2017-08-29 21:28:31 -07:00
Kris Maglione c9899cb3fa Bug 1366511: Part 2 - Allow autoconverting Err(nsresult) to nsresult. r=ehsan,nbp
This allows MOZ_TRY and MOZ_TRY_VAR to be transparently used in XPCOM methods
when compatible Result types are used.

Also removes a compatibility macro in SimpleChannel.cpp, and an identical
specialization in AddonManagerStartup, which are no longer necessary after
this change.

MozReview-Commit-ID: 94iNrPDJEnN

--HG--
extra : rebase_source : 24ad4a54cbd170eb04ded21794530e56b1dfbd82
2017-08-29 21:28:22 -07:00
Honza Bambas 8d492fe637 Bug 1395525 - Make all changes landed as part of tracker request tailing preferrable. r=dragana 2017-08-31 06:07:00 -04:00
Michal Novotny a78130ade8 Bug 1384478 - browser/base/content/test/general/browser_save_video.js fails when we enable rcwn, r=honzab 2017-08-31 19:26:13 +02:00
Dragana Damjanovic 94f37c30f0 Bug 1394818 - TFO should be https only feature. r=mcmanus 2017-08-30 04:05:00 -04:00
Honza Bambas 4263c50db2 Bug 1358060 - Allow postponing of unimportant resources opening during page load, class-of-service Tail flag. r=dragana
--HG--
extra : rebase_source : 1ab691fe066e641c948aa5f42827305411579708
2017-08-30 09:32:00 -04:00
Michal Novotny c53ca61bdf Bug 1395121 - NS_NOTREACHED("mListener is null") in nsHttpChannel::OnStartRequest, r=valentin 2017-08-30 16:38:31 +02:00
Kershaw Chang 567b0d202a Bug 1377208 - Move background h2 stream into background group. r=hurley 2017-08-30 02:19:00 -04:00
Wes Kocher d03d9bee49 Merge m-c to inbound, a=merge
MozReview-Commit-ID: BJmeuDcuHke
2017-08-28 17:45:07 -07:00
Kershaw Chang 5bb493a802 Bug 1393736 - Include urgent start group for counting prioritySize. r=hurley 2017-08-27 23:11:00 -04:00
Tom Ritter f1a3d26f61 Bug 1392641 Check return value for functions declared with warn_unused_result r=bagder,nwgh
MozReview-Commit-ID: BJj3Lvtntd6

--HG--
extra : rebase_source : 1776aab1d6de123323dc034d11b24a6c7b9d7ea1
2017-08-25 14:37:44 -05:00
Sebastian Hengst 163be910bb Backed out changeset 05fc8d2d7ca9 (bug 863246) for failing various reftests, e.g. parser/htmlparser/tests/reftest/bug535530-2.html. r=backout on a CLOSED TREE 2017-08-25 16:44:40 +02:00
Chung-Sheng Fu 68b806c637 Bug 863246 - Content can only load resource:// URIs declared content-accessible in manifests r=billm,bz
bz:
    caps/nsScriptSecurityManager.cpp

billm:
    browser/extensions/activity-stream/jar.mn
    browser/extensions/onboarding/jar.mn
    chrome/RegistryMessageUtils.h
    chrome/nsChromeRegistry.h
    chrome/nsChromeRegistryChrome.cpp
    chrome/nsChromeRegistryContent.cpp
    netwerk/protocol/res/SubstitutingProtocolHandler.cpp
    netwerk/protocol/res/SubstitutingProtocolHandler.h
    netwerk/protocol/res/nsIResProtocolHandler.idl
    netwerk/protocol/res/nsISubstitutingProtocolHandler.idl
    netwerk/protocol/res/nsResProtocolHandler.cpp
    netwerk/protocol/res/nsResProtocolHandler.h
    xpcom/components/ManifestParser.cpp

MozReview-Commit-ID: 1RXeNn7jdBf

--HG--
extra : rebase_source : 749673b7a5bb0b50192a57496b2ea7962bf6b2d7
2017-06-08 17:44:09 +08:00
Sebastian Hengst aeacc34883 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 6TGQRm8SSk0
2017-08-24 13:28:57 +02:00
Michal Novotny 8030ac3f2d Bug 1382688 - Do not allow to enable old disk cache backend, r=honzab 2017-08-24 10:25:38 +02:00
Wes Kocher bd5fb0a92d Merge m-c to autoland, a=merge
MozReview-Commit-ID: AHOFLdPkEou
2017-08-23 18:08:30 -07:00
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Sebastian Hengst 99e5cb9c14 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: GSKVB94r7Kk
2017-08-23 16:29:51 +02:00
Tom Tung 3eb6957b71 Bug 1328398 - Add telemetry to measure service worker launch time. r=bkelly,francois datareview=francois
This patch is mainly to add a probe to measure sw launch time. To do this, this
patch records the sw launch time when the sw is just spwaned and it's ready to
handle the incoming fetch event.

MozReview-Commit-ID: 3w5MNyhQNnd

--HG--
extra : rebase_source : 3228213d0ea6be1d23b9c49382f1f8d3c2f358f1
2017-08-17 18:32:36 +08:00
Honza Bambas 135f2e4a1c Bug 1392264 - Return undispatched HTTP transaction to the queue in the same order as they were before. r=kershaw 2017-08-21 07:02:00 -04:00
Honza Bambas 51907c6b32 Bug 1388448 - Logs for better network requests and context tracking. r=mcmanus 2017-08-17 12:16:00 -04:00
Haik Aftandilian 3ed52c079e Bug 1390346 - Redirects to moz-extension:-URLs fail when loaded from a xpi. r=jimm
MozReview-Commit-ID: 2FzUWLTiLs

--HG--
extra : rebase_source : a8893d082a4dd102b59b448ff65b4fb875edb334
2017-08-18 11:30:21 -07:00
Nicholas Nethercote 780a2e4aec Bug 1390428 (part 4) - Remove still more nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is null checked. The patch uses IsVoid() to replace
the null checks (and get() and EqualsLiteral() calls to replace any implicit
conversions).

--HG--
extra : rebase_source : 484ad42a7816b34b86afbe072e04ba131c1619c6
2017-08-16 13:58:55 +10:00
Nicholas Nethercote bc3ca2ebdd Bug 1390428 (part 3) - Remove nsXPIDLCString use in nsHttpHandler. r=erahm.
Most of these fields are not using any nsXPIDLCString-specific features.
The exceptions are mUserAgentOverride and mDefaultSocketType, which require a
little more care.

--HG--
extra : rebase_source : 50d2178b7bf10f6076fe27f2e65a4b63f1153590
2017-08-16 13:58:55 +10:00
Chung-Sheng Fu 6a8ee766d6 Bug 863246 - Content can only load resource:// URIs declared content-accessible in manifests r=billm,bz
bz:
    caps/nsScriptSecurityManager.cpp

billm:
    browser/extensions/activity-stream/jar.mn
    browser/extensions/onboarding/jar.mn
    chrome/RegistryMessageUtils.h
    chrome/nsChromeRegistry.h
    chrome/nsChromeRegistryChrome.cpp
    chrome/nsChromeRegistryContent.cpp
    netwerk/protocol/res/SubstitutingProtocolHandler.cpp
    netwerk/protocol/res/SubstitutingProtocolHandler.h
    netwerk/protocol/res/nsIResProtocolHandler.idl
    netwerk/protocol/res/nsISubstitutingProtocolHandler.idl
    netwerk/protocol/res/nsResProtocolHandler.cpp
    netwerk/protocol/res/nsResProtocolHandler.h
    xpcom/components/ManifestParser.cpp

MozReview-Commit-ID: 1RXeNn7jdBf

--HG--
extra : rebase_source : 83000448abf58b7956c2eb122604d7ab38ad0f7c
2017-06-08 17:44:09 +08:00
Valentin Gosu 396c957233 Bug 1306646 - Match updated Timing-Allow-Origin definition for resource timing r=nwgh
MozReview-Commit-ID: GQDhISc9WRD
2017-08-22 22:33:03 +02:00
Sebastian Hengst 75955d0246 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 8fJX1xXgzhD
2017-08-22 11:49:04 +02:00
Nicholas Nethercote 8a72cf2251 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm.
--HG--
extra : rebase_source : 69d58b0cfb56efc6b03d8e2d7be2ce3c3e6cd843
2017-08-21 20:01:27 +10:00
Nicholas Nethercote 4a623e6df4 Bug 1385172 - Replace nsEscapeHTML{,2}() with new nsAppendEscapedHTML() function. r=erahm.
The existing functions work with C strings but almost all the call sites use
Mozilla strings.

The replacement function has the following properties.

- It works with Mozilla strings, which makes it much simpler and also improves
  the call sites.

- It appends to the destination string because that's what a lot of the call
  sites need. For those that don't, we can just append to an empty string.

- It is declared outside the |extern "C"| section because there is no need for
  it to be in that section.

Note: there is no 16-bit variant of nsAppendEscapedHTML(). This is because
there are only two places that need 16-bit variants, both rarely executed,
and so converting to and from 8-bit is good enough.

The patch also adds some testing of the new function, renaming
TestEscapeURL.cpp as TestEscape.cpp in the process, because that file is now
testing other kinds of escaping.

--HG--
rename : xpcom/tests/gtest/TestEscapeURL.cpp => xpcom/tests/gtest/TestEscape.cpp
extra : rebase_source : 51145ae2c9b0b4573c7ea0c342dcb246f9f14fb9
2017-08-18 12:00:59 +10:00
Dragana Damjanovic b274c67092 Bug 1390881 - Improve the TFO telemetry. r=mcmanus 2017-08-20 09:45:26 +02:00
Wes Kocher 91f1f19054 Merge m-c to autoland, a=merge
MozReview-Commit-ID: IMdYxijQ9ie
2017-08-21 17:20:06 -07:00
Nicholas Hurley d4f64ba24e Bug 1391467 - Remove --enable-necko-protocols. r=gps,valentin
This patch removes the ability to select which protocols you want
included in necko, a wholly untested configuration that is broken in
practice. We have no need of this kind of configurability in necko.

In addition, this removes the final vestiges of rtsp support, which was
originally removed in bug 1295885 but still had some stuff hanging
around behind some ifdefs (that were never true).

MozReview-Commit-ID: KOEaDmit2IL

--HG--
extra : rebase_source : f6c2fdb972aaba46e922cda801252dc953550b94
2017-08-17 17:30:57 -07:00
Phil Ringnalda 9359f5bf39 Merge inbound to m-c, a=merge
MozReview-Commit-ID: LCCoXUsCtmv
2017-08-19 15:29:10 -07:00
Chris Peterson 1447808ce8 Bug 1389851 - netwerk: Fix -Wunreachable-code-return warning in nsGIOProtocolHandler.cpp. r=karlt
netwerk/protocol/gio/nsGIOProtocolHandler.cpp:89:10: warning: 'return' will never be executed [-Wunreachable-code-return]

This `return NS_ERROR_FAILURE` statement at the end of this function is unreachable because all of the preceding switch statement's cases return.

MozReview-Commit-ID: 3qDu2IqTPrW

--HG--
extra : rebase_source : bcd8a07eee82b60fc071787ccb7df7d9f45d0679
2017-08-09 00:38:15 -07:00
Wes Kocher b1fc5e008c Merge inbound to central, a=merge
MozReview-Commit-ID: 4cWGBbMEU2x
2017-08-18 15:53:07 -07:00
Shane Caraveo 4437e84fb7 Bug 1391720 remove _blank support for background pages, r=kmag
MozReview-Commit-ID: aRpNSrE483

--HG--
extra : rebase_source : f6a037937350ee7d8f502a9060459a073bd60190
2017-08-18 11:30:01 -07:00
Wes Kocher c1383cebf3 Merge m-c to autoland, a=merge
MozReview-Commit-ID: KLrOCT1a7El
2017-08-17 16:23:45 -07:00
Carsten "Tomcat" Book 99aa3f8e70 Merge mozilla-central to mozilla-inbound 2017-08-17 13:13:10 +02:00
Nicholas Nethercote 025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Michael Kaply 73bafcec5e Bug 1389168 - Remove unnecessary IBM license text. r=gerv
MozReview-Commit-ID: 8HdaBppsJsc

--HG--
extra : rebase_source : 617c17b1162265e44810597fa69d533316da1a6b
2017-08-16 16:10:56 -05:00
Sajjad Arshad 404facfbbc Bug 1388925 - Add an opaque flags to have a fine-grained control over TLS configurations. r=mcmanus, r=keeler
This flags is added in the http channel interface by which developers can control the TLS
connections from JavaScript code (e.g. Add-ons). Basically, all the changes accounted for
plumbing this TLS flags from JavaScript level to C++ code responsible for calling NSS
module. We also added a unit test to make sure that separate connections are created if we
use different tlsFlags. Basically we used a concrete set of flag values that covers the
edge cases and check the hashkey generated in the connection info.

--HG--
rename : netwerk/test/unit/test_separate_connections.js => netwerk/test/unit/test_tls_flags_separate_connections.js
2017-08-16 12:41:16 -07:00
Michal Novotny f96c866888 Bug 1388684 - RCWN breaks HTTP_CHANNEL_DISPOSITION telemetry, r=mcmanus 2017-08-16 01:11:43 +02:00
Shane Caraveo 340c39b332 Bug 1368527 add new on-before-connect notification to httpChannel, r=dragana,kmag
MozReview-Commit-ID: 8hiAgY4KzDB

--HG--
extra : rebase_source : d18bbf2ce011cf2236a3cebdc65a750e9ef66c10
2017-08-15 13:11:50 -07:00
Dragana Damjanovic dd.mozilla@gmail.com 7afdc757f4 Bug 1390503 - Retry without fast open if error is NS_ERROR_FAILURE. r=mcmanus 2017-08-15 19:38:16 +02:00
Masatoshi Kimura 74df77800f Bug 1389738 - Remove @deprecated nsIHttpEventSink. r=mcmanus
MozReview-Commit-ID: 5TaiTc6fSLK

--HG--
extra : rebase_source : acbbecb29c61bb1d84efc2fb7418806e61828003
2017-08-12 18:26:23 +09:00
Ethan dd89a080a0 Bug 1383495 - Spoof Navigator API platform as win64 when resisting fingerprinting is enabled. r=ehsan 2017-08-11 09:51:09 +08:00
Michael Layzell 4f71ca4422 Bug 1379345 - Transmit permissions for view-source URIs, r=ehsan 2017-08-18 12:38:04 -04:00
Ryan VanderMeulen 24c9581b48 Backed out changeset fbf0e8609abb (bug 1390428) for Windows clipboard test failures on a CLOSED TREE. 2017-08-18 10:58:47 -04:00
Dragana Damjanovic a7386daa3f Bug 1363372 - Wait until OVERLAPPED structure return a result before distroying a socket. r=mcmanus 2017-07-27 11:37:11 +02:00
Sebastian Hengst 51d351f567 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-08-10 17:41:11 +02:00
Haik Aftandilian f5314b4f60 Bug 1386832 - Part 2 - Make Linux dev build security check exception not depend on MOZ_DEVELOPER_REPO. r=jimm
For Linux dev builds, change the developer build unpacked security check
exception to not depend on knowing the repo dir because MOZ_DEVELOPER_REPO
isn't reliably set whenever the firefox binary is run. Instead, make sure the
extension root directory is within NS_GRE_DIR. Use both checks on Mac.

MozReview-Commit-ID: IsbbNS58yf8

--HG--
extra : rebase_source : 64d1008a0513938edc111d12cb9fb28d2048ac82
2017-08-09 16:11:59 -07:00
Thomas Wisniewski c20797f0fa Bug 1261289 - Allow webextensions to open view-source links. r=mixedpuppy, r=smaug
MozReview-Commit-ID: A8TGE448vBs
2017-06-20 15:23:49 -04:00
Nicholas Nethercote 5241bea863 Bug 1390428 (part 2) - Remove more nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is used in ways that rely on the implicit conversion
to |char*|. The patch uses get() and EqualsLiteral() calls to replace the
implicit conversions.
2017-08-16 13:58:55 +10:00
Thomas Wisniewski 7acd2dd485 Bug 1286554 - Remove network.http.keep_empty_response_headers_as_empty_string. r=jduell
MozReview-Commit-ID: 3b1Gpi6tit0
2016-07-13 10:40:29 -04:00
Liang-Heng Chen 798faa8403 Bug 1382178 - check null pointer before using; r=bagder
MozReview-Commit-ID: CjfWL39mYSP

--HG--
extra : rebase_source : 7a5d7d4d6fade97e7a37cf65cc7ae0f58d9b486f
2017-07-21 13:23:23 +08:00
Shih-Chiang Chien a53028f46a Bug 1387285 - release more member variable in HttpChannelChild on main thread. r=mayhemer
After bug 1338493 landed, HttpChannelChild might be released on STS thread.
Redirected channel, intercept stream listener and context might not always be able to
release off-main-thread. Therefore, we need to proxy release these members on main thread.

MozReview-Commit-ID: 6mcja7WY1fK

--HG--
extra : rebase_source : 55999dfa63b81347e426d90a59e211fabddba6d1
2017-08-04 18:40:00 +08:00
Wes Kocher cf8f3268a1 Merge inbound to central, a=merge
MozReview-Commit-ID: 5tBON9YUdAO
2017-08-07 15:23:46 -07:00
Honza Bambas a34f847b9f Bug 1386323 - Perform HTTP response throttling only for a limited time after new transactions are actived. r=mcmanus 2017-08-07 06:28:00 -04:00
Carsten "Tomcat" Book a24b9505f9 Merge mozilla-central to autoland 2017-08-07 13:16:54 +02:00
Honza Bambas c4e6e0b6c7 Bug 1387090 - Properly handle DontThrottle flag in all places in nsHttpTransaction. r=mcmanus 2017-08-03 10:47:00 -04:00
Dragana Damjanovic dd.mozilla@gmail.com 23c8b30d23 Bug 1381282 - Change nsScriptErrorBase::InitWithWindowID so that it does not call GetSensitiveInfoHiddenSpec as much as now. r=bz r=valentin 2017-08-07 15:56:30 +02:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Henry Chang af3b11c151 Bug 1375277 - New safebrowsing threat type "POTENTIALLY_HARMFUL_APPLICATION" introduced by v4. r=francois
As our threattype-listname conversion design, "goog-harmful-proto" is allocated
for this new threat type. This threat type is mainly for mobile.

MozReview-Commit-ID: G9GbgmHHHfp

--HG--
extra : rebase_source : 0681fcd9322b94451a86eafe57bf1ccc4b89db30
extra : intermediate-source : 28b0502d9add81beeae58a2c33f9fd5839d4d544
extra : source : 646f02f15131aa98ad37015b0a641304a3271796
2017-07-27 15:37:57 +08:00
Masatoshi Kimura 866d87ee67 Bug 1361579 - Remove nsISimpleContentPolicy. r=Ehsan
MozReview-Commit-ID: BsjkGpTpe8I

--HG--
extra : rebase_source : 640807623fc70797932a0ee592b887d5c134b5f9
2017-08-03 17:50:00 +09:00
Wes Kocher 2196b718d3 Merge inbound to central, a=merge
MozReview-Commit-ID: DlSLhaepjeU
2017-08-03 18:06:53 -07:00
Michal Novotny 926a7d4aa2 Bug 1382831 - Race condition in nsHttpChannel::OnCacheEntryCheck when racing cache with network. r=valentin, r=honzab
When racing cache with network, conditional or byte range header could be added in OnCacheEntryCheck. We need to remove these headers when sending the network request, otherwise we would send a conditional request while not having the entry.
2017-08-03 04:02:00 -04:00
Amy Chung 1f101b071c Bug 1331680 - Part 1: Send required cookies to the content process on demand. r=jdm 2017-08-03 19:00:41 +08:00
Wes Kocher baf6cddc4c Merge inbound to central, a=merge
MozReview-Commit-ID: 9NFjSEt96iT
2017-08-02 17:11:51 -07:00
Honza Bambas 46b81d1b6e Bug 1377205 - Functionality to explicitly disallow throttle of HTTP responses. r=hurley 2017-08-01 13:01:00 -04:00
Masatoshi Kimura f143125cc2 Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu
MozReview-Commit-ID: DqJdTGopR9G

--HG--
extra : rebase_source : e8c9eb03468c075b79013b6e0bd8b367229c24cd
2017-07-29 20:50:21 +09:00
Nicholas Hurley 5fd7068084 Bug 1381016 - Ensure we process FIN flags on all-padding final frames. r=swu
MozReview-Commit-ID: JuSGsYsmv4n

--HG--
extra : rebase_source : a3c016560cb8209c2e6a55cd05fc6d14d2057402
2017-08-01 15:24:44 -07:00
Dragana Damjanovic fa91873e57 Bug 1379631 - Make nsCORSListenerProxy really retargetable. r=mayhemer
--HG--
extra : rebase_source : dead854ea6e7511fcf92c3800c37a96017ad38c9
2017-08-01 15:05:22 -04:00
Sebastian Hengst ddd4030358 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: IrMqWiJhwan
2017-08-01 11:23:57 +02:00
Wes Kocher b11975d1ad Merge m-c to autoland, a=merge
MozReview-Commit-ID: L5cEw8jWPNI
2017-07-31 17:53:14 -07:00
Nicholas Nethercote 72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10:00
Nicholas Nethercote 581214bd8b Bug 1384835 (part 1, attempt 2) - Use nsA[C]String references instead of pointers for outparams of Get*String() pref functions. r=froydnj.
--HG--
extra : rebase_source : fe566945a55c281d8290634a5b55bed19415c839
2017-07-31 10:52:51 +10:00
Wes Kocher c07dbb8e82 Merge m-c to autoland, a=merge CLOSED TREE
MozReview-Commit-ID: FJUPXxVFLLL
2017-07-28 18:03:57 -07:00
Wes Kocher 40c3480d89 Merge inbound to central, a=merge
MozReview-Commit-ID: JNxfwQh0cac

--HG--
rename : gfx/layers/wr/WebRenderCompositableHolder.h => gfx/layers/wr/AsyncImagePipelineManager.h
2017-07-28 17:40:43 -07:00
Honza Bambas 585bff5b22 Bug 1383234 - Don't throttle Blocking/Unblocked marked HTTP responses. r=mcmanus 2017-07-28 08:10:00 -04:00
Carsten "Tomcat" Book 139661e8e4 Merge mozilla-central to mozilla-inbound 2017-07-28 15:25:58 +02:00
Carsten "Tomcat" Book 892bedca2e merge mozilla-inbound to mozilla-central a=merge 2017-07-28 15:24:39 +02:00
Nicolas B. Pierron 542817ed5d Bug 1371333 - Remove unused CacheTokenLastFetched from CacheInfoChannel. r=valentin 2017-07-28 13:06:48 +00:00