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

5568 Коммитов

Автор SHA1 Сообщение Дата
Bogdan Tara d628012cab Backed out 2 changesets (bug 1461534) for nsChannelClassifier.cpp related build bustages CLOSED TREE
Backed out changeset 152002e28671 (bug 1461534)
Backed out changeset b4818535bde9 (bug 1461534)
2018-07-09 20:01:05 +03:00
Francois Marier 7bf9a0bdd0 Bug 1461534 - Improve logging for the channel classifier. r=dimi
This patch reduces the level of noise in MOZ_LOG messages by:

- splitting log messages into Warning, Info, and Debug levels
- truncating long URIs down to the first 128 bytes
- not mentioning suspended channels on NS_OK results

It also introduces new log messages for the outcome of a
match against the blacklist:

- dropping the channel priority (tracking annotations)
- cancelling the channel (tracking protection)
- no match (i.e. not a tracker)

MozReview-Commit-ID: wSQChJkMKv

--HG--
extra : rebase_source : ce8229414a3e3f4335af23253a6dc0c55fa9118a
2018-07-09 09:42:31 -07:00
Francois Marier 6de941bdd0 Bug 1461534 - Enable user/add-on overrides of tracking annotations. r=dimi
MozReview-Commit-ID: GQfIGirbSuW

--HG--
extra : rebase_source : d25ce41b88663e862c8221772d3b3cb670f55f02
2018-07-03 17:32:29 -07:00
Tarek Ziadé 8533ddcaac Bug 1472718 - Convert ChromeUtils.requestIOActivity to a Promise - r=baku,valentin
Changes:

- The API now returns a Promise containing a sequence of IOActivityData dictionnaries.
- All the code related to notifications and XPCOM is removed.
- The counters are no longer reset to 0 when the API is called

MozReview-Commit-ID: 7J2EgFqDgf

--HG--
extra : rebase_source : eb7dc3e0921b12bbb3715a90863dc8e2a60c1c09
2018-07-06 13:43:08 +02:00
Margareta Eliza Balazs 4ee26c6e5e Backed out changeset c22aa9571139 (bug 1472718) for failures in browser/browser_test_io_activity.js on a CLOSED TREE 2018-07-06 11:04:39 +03:00
Tarek Ziadé 12c531f562 Bug 1472718 - Convert ChromeUtils.requestIOActivity to a Promise - r=baku,valentin
Changes:

- The API now returns a Promise containing a sequence of IOActivityData dictionnaries.
- All the code related to notifications and XPCOM is removed.
- The counters are no longer reset to 0 when the API is called

MozReview-Commit-ID: 7J2EgFqDgf

--HG--
extra : rebase_source : 4e16640a3f52fd7c042687471153971a66158623
2018-07-06 02:10:33 +02:00
Robert Bartlensky 50df265ee1 Bug 1471943: Remove release call to ensure socket is closed. r=valentin
MozReview-Commit-ID: 8RC4YdaqAdX

--HG--
extra : rebase_source : 029eeaad0a1eea60a9dce56756160a827b522d30
2018-07-02 11:45:39 +01:00
Valentin Gosu e6ea31c9c7 Bug 1471628 - Use singleton for captive portal constructor r=bagder
This is to make sure that the test is using the same Captive Portal Service that nsIOService initializes.

--HG--
extra : rebase_source : 62bd371b8d510f596d3484aec6fad997739ada8b
2018-07-02 15:30:33 +02:00
Valentin Gosu 57418912d1 Bug 1471628 - Add test for Captive Portal Service r=bagder
--HG--
extra : rebase_source : 08c0990f945fe6cdbaf405e257f8c35edd2e191f
2018-07-02 15:26:48 +02:00
Andrea Marchesini a1a6028669 Bug 1470355 - BufferWriter should stop reading data when the wanted amount has been reached, r=michal 2018-07-02 02:00:00 +03:00
Dorel Luca 9a50b6f6de Backed out 2 changesets (bug 1470355) for causing multiple failures
Backed out changeset 50b0bfa64b2c (bug 1470355)
Backed out changeset 198a4644c09a (bug 1470355)

--HG--
extra : amend_source : 10f20801a4e72fec17d53f6428d1c983a908a771
2018-07-02 15:06:11 +03:00
Andrea Marchesini 9b09232ce9 Bug 1470355 - BufferWriter should stop reading data when the wanted amount has been reached, r=michal 2018-07-02 02:00:00 +03:00
Nathan Froyd 9fd8289cf9 Bug 1471435 - part 2 - micro-optimize deferred MaybeOpen calls; r=valentin
We shouldn't need to QueryInterface from nsIFile to nsIFile!
2018-06-27 11:27:33 -04:00
Nathan Froyd d65aee9de5 Bug 1471435 - part 1 - clean up nsFile{Input,Ouput}Stream::Create; r=valentin
We should be using smart pointers here, and there's no need to check for
allocation failure with our infallible new policy.
2018-06-27 11:27:33 -04:00
Margareta Eliza Balazs 03ab62719a Merge mozilla-central to autoland. a=merge CLOSED TREE
--HG--
rename : devtools/client/debugger/test/mochitest/browser_dbg_tabactor-01.js => devtools/client/debugger/test/mochitest/browser_dbg_target-scoped-actor-01.js
rename : devtools/client/debugger/test/mochitest/browser_dbg_tabactor-02.js => devtools/client/debugger/test/mochitest/browser_dbg_target-scoped-actor-02.js
2018-06-26 18:08:43 +03:00
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Tarek Ziadé 7158cbfa29 Bug 1470073 - Make IOActivityMonitor timer optional - r=valentin
- Introduced the io.activity.enabled pref, so IOActivityMonitor can run without a timer
- Added IOActivityMonitor::NotifyActivities() to trigger notifications manually
- Added ChromeUtils.requestIOActivity() so we can trigger it via JS

MozReview-Commit-ID: 9JA2rLaM496

--HG--
extra : rebase_source : e473a7b0ec7c231ab321846c5ddcc4d6a88d7245
2018-06-26 10:43:16 +02:00
arthur.iakab 05cc8bb814 Backed out changeset b5e89c1b4e8c (bug 1470073) for failing browser chrome tests on browser_test_io_activity.js on a CLOSED TREE 2018-06-26 04:10:45 +03:00
Tarek Ziadé 0f643a27fd Bug 1470073 - Make IOActivityMonitor timer optional - r=valentin
- Introduced the io.activity.enabled pref, so IOActivityMonitor can run without a timer
- Added IOActivityMonitor::NotifyActivities() to trigger notifications manually
- Added ChromeUtils.requestIOActivity() so we can trigger it via JS

MozReview-Commit-ID: 9JA2rLaM496

--HG--
extra : rebase_source : 0a92195b6b8314383c63de4b2bb1dfe033c40e9f
2018-06-25 18:32:22 +02:00
Ben Kelly 06ae64dde8 Bug 1470286 Propagate channel creation and async open time across internal redirects. r=valentin 2018-06-23 10:10:10 -07:00
Ben Kelly bee2ef4646 Bug 1470114 Make parent-side of redirect override the reserved ClientInfo to handle some corner cases. r=valentin 2018-06-22 08:09:00 -07:00
Valentin Gosu a8e3a8c349 Bug 1448330 - Make nsIURI.clone a private method r=mayhemer
MozReview-Commit-ID: 1efpeaEPaXP

--HG--
extra : rebase_source : e660f1e5bcae9b7119bc5b37713691069272b375
2018-06-14 13:05:43 +02:00
Andrea Marchesini 6b1a54c793 Bug 1469290 - Avoid extra locks in NS_ReadInputStreamToBuffer, r=valentin 2018-06-18 19:41:29 -04:00
Valentin Gosu 4cade1b2b5 Bug 1389251 - Add esc_Spaces that may be used to force escaping of spaces r=bz,jdescottes
MozReview-Commit-ID: 4tahH3IOKW

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

--HG--
extra : rebase_source : c7ea99bc727a82e652871e78c222e8d5d642a52e
2018-06-12 03:05:03 +02:00
Andi-Bogdan Postelnicu 90ac230485 Bug 1453795 - Necko - Initialize member fields in classes/ structures. r=michal 2018-06-14 11:19:07 +03:00
Jan de Mooij 2b3ff5c90a Bug 1468219 - Rename JS_InitStandardClasses to JS::InitRealmStandardClasses, remove obj argument. r=anba
--HG--
extra : rebase_source : 5c092c37298e89096b85524e92d143ff2447f31f
2018-06-13 12:47:47 -07:00
Tarek Ziadé 2ad736aa2e Bug 1447931 - NetworkActivity becomes IOActivity - r=baku,mak,valentin
Generalizes NetworkActivity so it can be used for sockets but also disk files.
The host/port data becomes a single location string prefixed with socket://
or file:// and we're not using the FD as the identifier anymore.

IOActivityMonitor is now used in three places:

- nsFileStreams for plain files
- TelemetryVFS for sqlite files
- nsSocketTransport & nsUDPSocket for UDP & TCP sockets

MozReview-Commit-ID: GNu5o400PaV

--HG--
rename : netwerk/base/NetworkActivityMonitor.cpp => netwerk/base/IOActivityMonitor.cpp
rename : netwerk/base/NetworkActivityMonitor.h => netwerk/base/IOActivityMonitor.h
rename : netwerk/base/nsINetworkActivityData.idl => netwerk/base/nsIIOActivityData.idl
extra : rebase_source : 55a1c51b261ffbe16f88671d55445d1b0d9106b6
2018-06-12 13:22:50 -07:00
Johann Hofmann 2339934fea Bug 1462470 - Part 1 - Notify frontend of loaded tracking content in annotation-only mode. r=Ehsan
In order to notify the user that there is tracking content on the page
which could have been blocked by Tracking Protection, we need to mark
the document as having tracking content even when TP is off.

Part 2 will update the desktop frontend to handle this correctly and
show a different message when TP is on vs. off. Fennec should not be
affected by this change since it already prevents loaded state from
showing if TP is disabled:

https://searchfox.org/mozilla-central/rev/dc6d85680539cb7e5fe2843d38a30a0581bfefe1/mobile/android/chrome/content/browser.js#5669
https://searchfox.org/mozilla-central/rev/dc6d85680539cb7e5fe2843d38a30a0581bfefe1/mobile/android/modules/geckoview/GeckoViewProgress.jsm#112

MozReview-Commit-ID: LNF0zABNsx1

--HG--
extra : rebase_source : c06a7ed9a32b9674a9c5a35834d39cf90f60b592
2018-05-24 12:44:42 +02:00
Ben Kelly ecb17922d9 Bug 1468213 Propagate nsILoadInfo.serviceWorkerTaintingSynthesized and tainting values from parent process to child process. r=valentin 2018-06-11 12:54:22 -07:00
Ben Kelly 6301585f22 Bug 1467852 Align LoadInfo::mServiceWorkerTaintingSynthesized handling with other service worker fields. r=valentin 2018-06-10 18:44:38 -07:00
Ciure Andrei 05605d68c4 Merge inbound to mozilla-central. a=merge 2018-06-08 00:50:18 +03:00
Nicholas Hurley 2423735102 Bug 1460310 - Separate HTTP and SPDY identifiers into separate namespaces. r=dragana
MozReview-Commit-ID: E55YpGK7PXI

--HG--
extra : rebase_source : 3146c7de66653262694235043a44be4ccf5ffc33
2018-06-01 11:32:05 -07:00
Jan de Mooij 56ca3c9524 Bug 1466501 part 1 - Refactor ZoneSpecifier and add a sameCompartmentAs option to newGlobal in the shell. r=luke 2018-06-07 10:02:10 +02:00
Andrea Marchesini 8005b74540 Bug 1465465 - Block ports 427, 548 and 6697, r=annevk, r=valentin 2018-06-05 07:49:02 +02:00
Andrea Marchesini 1f69f950e8 Bug 1465465 - Update blocked port names, r=annevk, r=valentin 2018-06-05 07:49:02 +02:00
Ben Kelly ac7ea6f3f6 Bug 1441932 P4 Treat same-value assignments to the LoadInfo reserved and initial ClientInfo values as no-op changes. r=mayhemer 2018-06-04 09:26:51 -07:00
Valentin Gosu 300188571e Bug 1392739 - Use CheckedInt in nsStandardURL::Deserialize(). r=mayhemer 2018-06-04 13:57:51 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

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

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

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

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Andrea Marchesini e3efeac3c5 Bug 1460561 - nsMultiplexInputStream should behave correctly when NS_InputStreamIsBuffered() is used - gtests, r=froydnj 2018-05-24 07:52:31 +02:00
Kate McKinley fa06a45b28 Bug 1328695 - Use protocol flags to determine if a URI is potentially trustworthy r=ckerschb, r=dveditz, r=mcmanus, r=bz
Before this change, the trusted URI schemes, based on a string whitelist, were:
https, file, resource, app, moz-extension and wss.

This change removes "app" from the list (since we don't implement it),
and adds "about" to the list (because we control the delivery of that).
2018-05-31 07:51:42 +02:00
Andrea Marchesini 9023e7c7b4 Bug 1446937 - Have ContextForTopLevelLoad return already_AddRefed<nsISupports> within LoadInfo, r=qdot 2018-05-30 21:21:18 +02:00
Andrea Marchesini 1273dc5391 Bug 1446933 - Remove 'using namespace mozilla::net' from BackgroundUtils.h, r=qdot 2018-05-30 21:21:17 +02:00
Honza Bambas 8a9d38fe70 Bug 1442178 - Do a busy wait of socket poll() shortly after network change detection, r=dragana 2018-05-30 17:36:42 +03:00
Honza Bambas dab22ca3b9 Bug 1442178 - Repair broken socket polling wakeup mechanism after a network change to prevent long load hangs, r=dragana 2018-05-30 17:31:09 +03:00
Boris Zbarsky dd184e287a Bug 1455676 part 5. Remove nsIDOMNode usage from netwerk/. r=qdot 2018-05-29 22:58:48 -04:00
Andreea Pavel 0dada2bb52 Merge inbound to mozilla-central. a=merge 2018-05-24 01:00:23 +03:00
Patrick McManus 65939b6f9d Bug 1463509 - SOCKS support for Alternative Services r=valentin
MozReview-Commit-ID: 1oXnQuzOqsC

--HG--
extra : rebase_source : 84bfaec48c5fc216da6586e7f06f118292d3fb17
2018-05-22 13:50:56 -04:00
Andrea Marchesini 4d342e4ebf Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 8 - PartiallySeekableInputStream exposes nsIInputStreamLength, r=mayhemer 2018-05-23 07:12:35 +02:00
Andrea Marchesini f0fb8aa183 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 6 - nsMIMEInputStream exposes nsIInputStreamLength, r=mayhmer 2018-05-23 07:12:35 +02:00
Andrea Marchesini 958612bfaf Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 5 - nsBufferedInputStream exposes nsIInputStreamLength, r=froydnj, r=mayhemer 2018-05-23 07:12:35 +02:00
Kris Maglione 8340513b0c Bug 1463287: Add QueryInterface helper macro for concrete class types. r=bz
Using concrete class types with static IIDs in QueryInterface methods is a
pretty common pattern which isn't supported by any existing helper macros.
That's lead to separate ad-hoc implementations, with varying degrees of
dodginess, being scattered around the tree.

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

MozReview-Commit-ID: HaTGF7MN5Cv

--HG--
extra : rebase_source : ace930129d85960d22bc3048ca3bb19bbbd4a63e
extra : histedit_source : 03a87f746d957789d41381e4e1bfcc4fd7eebaf2%2C9c5bae9feeeef7721105db67be0f83e0ded66bb7
2018-05-21 16:33:18 -07:00
Kris Maglione 6b12d08f7d Bug 1462937: Update callers to use nsIFile::GetDirectoryEntries as a nsIDirectoryEnumerator. r=froydnj
MozReview-Commit-ID: Iv4T1MVAF5

--HG--
extra : rebase_source : 1c518883d082884db7f9323a5acc20361228c26b
extra : histedit_source : 70a73c23d1199d3bfbb5379c78930401166c094b
2018-05-19 20:17:45 -07:00
Patrick McManus f18aa94399 Bug 1462357 - remove the channel and socket interface id r=bagder,baku
the id was a b2g feature only settable via chrome privd xhr and is no
longer active in the code base

MozReview-Commit-ID: 84GPNvhvjNb

--HG--
extra : rebase_source : ab5c2229b98e1407b8b74ef2ee00dcfea45e046a
2018-05-16 16:05:03 -04:00
Jan de Mooij 17f3983d0f Bug 1461605 part 1 - Rename CompartmentOptions to RealmOptions. r=luke,bz 2018-05-17 10:59:45 +02:00
Jan de Mooij 80e44e8003 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Dorel Luca dbe91ea7b6 Merge mozilla-central to autoland 2018-05-23 13:03:24 +03:00
Jonathan Kingston 5054bfcd70 Bug 1463398 - Removal of deprecated newChannel() API on nsIIOService r=ckerschb
MozReview-Commit-ID: 5AwSnQhFtT2

--HG--
extra : rebase_source : e9e8a3109f045f5583389042b2c6dc187cf0b6a8
2018-05-22 13:09:41 +01:00
Chris Peterson 94658984be Bug 1461243 - Part 2: Remove unused functions NS_CheckIsJavaCompatibleURLString() and NS_MakeRandomInvalidURLString(). r=jimm
These functions were only used in some Java workarounds in NPAPI _getproperty.

MozReview-Commit-ID: FqCd5ss1VqQ

--HG--
extra : rebase_source : b1513e5dbdcf652b401529a5e3f9cfce09a73a62
extra : intermediate-source : 54c6b063aecba84c5a40bb1b1c298278b3d0b320
extra : source : 53754664b3c6eb49f3a9367e38776bf32739b85c
2016-11-22 01:10:40 -08:00
Drew Willcoxon 093e6d0259 Bug 1239708: Improve awesomebar autofill. Part 1: Core follow-ons. r=mak
MozReview-Commit-ID: 1mfqU6mOyR9

--HG--
extra : rebase_source : 0750532c3e7cc1a3488387091afbfb68279a46b8
2018-05-14 11:21:47 -07:00
Adrian Wielgosik af5b239997 Bug 1460940 - Remove nsIDOMDocument uses in netwerk/. r=bz
MozReview-Commit-ID: QkZ36LGoBx

--HG--
extra : rebase_source : 5aa83c576f269a6f33a1fb7ea7a61bd63a3c0c25
2018-05-11 19:46:15 +02:00
Valentin Gosu c139a8886a Bug 1460198 - When calling SetRef/SetQuery/SetPathQueryRef you should do the same for the inner URI r=bz
MozReview-Commit-ID: C7GCPgU2RJb

--HG--
extra : rebase_source : 895ec63d01244e358e1fdf067ddb2425b6b69742
2018-05-12 16:30:07 +02:00
Valentin Gosu 3814b161a4 Bug 1451262 - Call NS_ProcessPendingEvents after StopSSLServerCertVerificationThreads r=mayhemer
If there are still pending events after we null out gSocketThread, OnSocketThread() will always return false, which can trigger assertions.

MozReview-Commit-ID: CovFIU3cKL

--HG--
extra : rebase_source : e025dce2a347249be7a259fdcca2c6a8c6040d13
2018-05-10 10:37:24 +02:00
Valentin Gosu bd4365d7e7 Bug 1448058 - Remove nsIMutable from URI implementations r=mayhemer
* Also removes NS_TryToMakeImmutable, NS_TryToSetImmutable, URIIsImmutable
* NS_EnsureSafeToReturn, nsINetUtil.toImmutableURI

MozReview-Commit-ID: 5eFtFm2CQt7

--HG--
extra : rebase_source : 1f3d23ec646883e76844d42113bc1c71c01a1ad7
2018-05-09 18:21:24 +02:00
Andrea Marchesini b5118e1ddf Bug 1302449 - Remove the "referrer" directive in CSP, r=ckerschb 2018-05-09 13:15:08 +02:00
Stephen A Pohl b5c7b7b14c Bug 1366808: Add about:restartrequired page for situations when a background update has occurred and restarting Firefox is required to continue. r=felipe 2018-05-08 10:31:37 -04:00
arthur.iakab 2f2f2ffdbf Merge mozilla-central to inbound 2018-05-08 15:44:33 +03:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Andrea Marchesini 183a361d75 Bug 1450302 - nsInputStreamPump should interrupt the reading of the inputStream when suspended, r=michal 2018-05-05 22:58:43 +02:00
Nathan Froyd 709477d79d Bug 1459035 - micro-optimize refcounting for nsSocket{Input,Output}Stream; r=valentin 2018-05-04 13:52:02 -04:00
Andrea Marchesini 5c5b562242 Bug 1458821 - Rename nsIAsyncFileMetadata.asyncWait to asyncFileMetadataWait, r=smaug 2018-05-03 17:03:17 +02:00
Andi-Bogdan Postelnicu 3f2298c2f6 Bug 1457411 - Update netwerk module to make use of newer methods introduced with c++11 and c++14. r=valentin
MozReview-Commit-ID: 666LNaHyiuQ

--HG--
extra : rebase_source : f3a24e0342d8dcdf9020dd473bc6b1045cbc533b
2018-04-30 19:46:04 +03:00
Valentin Gosu 6a2d43d5e7 Bug 1456863 - Backed out bug 356831 (changeset 204bb43af943) for leaks r=me 2018-04-30 15:34:39 +02:00
Michal Novotny ee8f43208a Bug 1448476 - Cache entry corruption after writing the alternate data. r=honzab
When writing to alt-data output stream fails for whatever reason, we now try to
truncate alternative data and keep the original data instead of dooming the
whole entry. The patch also changes how is the predicted size passed to the
cache. Instead of a dedicated method it's now an argument of openOutputStream
and openAlternativeOutputStream methods which fail in case the entry would
exceed the allowed limit.
2018-04-25 07:01:00 +03:00
Boris Zbarsky 6bf97b61c0 Bug 1455674 part 13. Remove remaining xpidl uses of nsIDOMElement. r=qdot 2018-04-26 23:37:29 -04:00
Dorel Luca 7153e84656 Backed out 3 changesets (bug 1451307) for Mochitest failure on toolkit/components/url-classifier/tests/mochitest/test_bug1254766.html. CLOSED TREE
Backed out changeset be0a9b78c224 (bug 1451307)
Backed out changeset 13e58d5887d8 (bug 1451307)
Backed out changeset 7f89d94d45ba (bug 1451307)

--HG--
rename : browser/base/content/test/trackingUI/benignPage.html => browser/base/content/test/general/benignPage.html
rename : browser/base/content/test/trackingUI/browser_trackingUI_1.js => browser/base/content/test/general/browser_trackingUI_1.js
rename : browser/base/content/test/trackingUI/browser_trackingUI_2.js => browser/base/content/test/general/browser_trackingUI_2.js
rename : browser/base/content/test/trackingUI/browser_trackingUI_3.js => browser/base/content/test/general/browser_trackingUI_3.js
rename : browser/base/content/test/trackingUI/browser_trackingUI_4.js => browser/base/content/test/general/browser_trackingUI_4.js
rename : browser/base/content/test/trackingUI/browser_trackingUI_5.js => browser/base/content/test/general/browser_trackingUI_5.js
rename : browser/base/content/test/trackingUI/browser_trackingUI_6.js => browser/base/content/test/general/browser_trackingUI_6.js
rename : browser/base/content/test/trackingUI/browser_trackingUI_telemetry.js => browser/base/content/test/general/browser_trackingUI_telemetry.js
rename : browser/base/content/test/trackingUI/file_trackingUI_6.html => browser/base/content/test/general/file_trackingUI_6.html
rename : browser/base/content/test/trackingUI/file_trackingUI_6.js => browser/base/content/test/general/file_trackingUI_6.js
rename : browser/base/content/test/trackingUI/file_trackingUI_6.js^headers^ => browser/base/content/test/general/file_trackingUI_6.js^headers^
rename : browser/base/content/test/trackingUI/trackingPage.html => browser/base/content/test/general/trackingPage.html
2018-04-26 05:08:47 +03:00
Johann Hofmann 1ba014ff7a Bug 1451307 - Part 1 - Consider iframes when comparing loading URIs in nsChannelClassifier::SetBlockedContent. r=francois,mayhemer
MozReview-Commit-ID: 17edGCCTEmo

--HG--
extra : rebase_source : 41bc6062edc390d0be402f67b4efa0c6f17431d7
2018-04-19 17:21:58 +02:00
Polly Shaw 091db15fe1 Bug 356831 - Proxy autodiscovery doesn't check DHCP (option 252) r=bagder,valentin
This patch addresses an issue with Firefox's proxy detection on networks which
do not have their a proxy auto-configuration (PAC) file hosted at
http://wpad/wpad.dat, and instead make use of DHCP option 252 for broadcasting
the address of the PAC file. See https://findproxyforurl.com/wpad-introduction/
for an introduction to the protocol.

Prior to this patch, proxy auto-detect missed out the DHCP query stage, and just
 looked for a PAC file at http://wpad/wpad.dat


This patch only addresses the issue for Firefox on Windows, although it defines a
DHCP client interface which could be implemented on other platforms.

The high-level components of this patch are:
 * nsIDHCPClient.idl - this is an interface which has been defined for querying the
   DHCP server.
 * nsPACMan.cpp - where previously when the PAC URL was simply set to a constant of
   http://wpad/wpad.dat, it now dispatches an asynchronous command to the proxy
   thread. The class ExecutePACThreadAction has been augmented to include an
   instruction to 'ConfigureWPAD' (Configure Web-proxy auto-detect), and a new class,
   'ConfigureWPADComplete' has been created to relay the result (the URL of the PAC
   file) back to the nsPACMan object.
 * nsProtocolProxyService.cpp
   Minor changes to reflect the fact that the PAC URL not being set does not always
   mean there is no PAC to be used; instead it could be in the process of being
   detected.
 * TestPACMan.cpp
   This is a new file, and tests only the DHCP auto-detect functionality.
   Some tests use multiple threads, as they test the non-blocking proxy detection.
 * DHCPUtils.cpp
   A class containing the main logic for querying DHCP.
 * WindowsNetworkFunctionsWrapper.cpp
   A very thin wrapper around the Windows API calls needed by DHCPUtils.
   This class was introduced so it could be mocked out in tests.
 * nsWindowsDHCPClient.cpp
 * An implementation of the interface defined in nsIDHCPClient.idl. Fairly thin:
   most logic is implemented in DHCPUtils.
 * TestDHCPUtils.cpp
   Tests for DHCPUtils and nsWindowsDHCPClient

MozReview-Commit-ID: HinC1UevOon

--HG--
extra : rebase_source : cf29f76826cc7728fd36505c8271bf50001c644c
2018-04-22 18:13:11 +01:00
Michael Kaply c2f87a5b92 Bug 1418953 - Remove NS_APP_USER_SEARCH_DIR. r=florian
MozReview-Commit-ID: DYzdJtz5aEH

--HG--
extra : rebase_source : 4dc75dfb011a174b7baf50e6f7faa720d88e4723
2018-04-24 15:19:47 -05:00
Margareta Eliza Balazs 0fe561286b Backed out changeset 2a760b1c0759 (bug 356831) for adding files without having a bugzilla product and component 2018-04-24 19:33:00 +03:00
Polly Shaw f95f738f4e Bug 356831 - Proxy autodiscovery doesn't check DHCP (option 252) r=bagder,valentin
This patch addresses an issue with Firefox's proxy detection on networks which
do not have their a proxy auto-configuration (PAC) file hosted at
http://wpad/wpad.dat, and instead make use of DHCP option 252 for broadcasting
the address of the PAC file. See https://findproxyforurl.com/wpad-introduction/
for an introduction to the protocol.

Prior to this patch, proxy auto-detect missed out the DHCP query stage, and just
 looked for a PAC file at http://wpad/wpad.dat


This patch only addresses the issue for Firefox on Windows, although it defines a
DHCP client interface which could be implemented on other platforms.

The high-level components of this patch are:
 * nsIDHCPClient.idl - this is an interface which has been defined for querying the
   DHCP server.
 * nsPACMan.cpp - where previously when the PAC URL was simply set to a constant of
   http://wpad/wpad.dat, it now dispatches an asynchronous command to the proxy
   thread. The class ExecutePACThreadAction has been augmented to include an
   instruction to 'ConfigureWPAD' (Configure Web-proxy auto-detect), and a new class,
   'ConfigureWPADComplete' has been created to relay the result (the URL of the PAC
   file) back to the nsPACMan object.
 * nsProtocolProxyService.cpp
   Minor changes to reflect the fact that the PAC URL not being set does not always
   mean there is no PAC to be used; instead it could be in the process of being
   detected.
 * TestPACMan.cpp
   This is a new file, and tests only the DHCP auto-detect functionality.
   Some tests use multiple threads, as they test the non-blocking proxy detection.
 * DHCPUtils.cpp
   A class containing the main logic for querying DHCP.
 * WindowsNetworkFunctionsWrapper.cpp
   A very thin wrapper around the Windows API calls needed by DHCPUtils.
   This class was introduced so it could be mocked out in tests.
 * nsWindowsDHCPClient.cpp
 * An implementation of the interface defined in nsIDHCPClient.idl. Fairly thin:
   most logic is implemented in DHCPUtils.
 * TestDHCPUtils.cpp
   Tests for DHCPUtils and nsWindowsDHCPClient

MozReview-Commit-ID: HinC1UevOon

--HG--
extra : rebase_source : df2b80fcc03948e54f222e11060e1783f3b95421
2018-04-22 18:13:11 +01:00
Valentin Gosu f96bb4a629 Bug 1423495 - Part6: Use threadsafe refcounting for nsServerTiming r=baku,nwgh
* Also keeps the timing array as nsTArray<nsCOMPtr<nsIServerTiming>> instead of the scriptable nsIArray (which doesn't like being released on another thread)

MozReview-Commit-ID: 37uPZJ38saQ

--HG--
extra : rebase_source : 099ec74c3032ef6033d187a028466777200c6015
2018-04-24 13:04:12 +02:00
Valentin Gosu aadb739cdd Bug 1455830 - Fix -Wunused-lambda-capture warning in nsStandardURL::SetPassword r=me 2018-04-22 20:24:12 +02:00
Dorel Luca 15813c8ca0 Merge mozilla-central to mozilla-inbound 2018-04-21 02:06:35 +03:00
Kris Maglione b5f8a1f0be Bug 1455446: Set CLOEXEC on socket FDs. r=dragana
MozReview-Commit-ID: L617m03Z3RS

--HG--
extra : rebase_source : ab65ab2d441c7f27c181d6c67b71c4a17347a45a
2018-04-19 14:23:25 -07:00
Valentin Gosu 2f4c67fee0 Bug 1439632 - Make sure password is always empty after calling SetPassword(EmptyCString()) on a URI r=mayhemer
MozReview-Commit-ID: LaHHo3A2xvk

--HG--
extra : rebase_source : 3ee78452aac95f4f4766e8f9a1d3021f6fc832fe
2018-04-14 00:10:40 +02:00
Cosmin Sabou 5e9d16a446 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-04-20 01:37:07 +03:00
Christoph Kerschbaumer cf3858588b Bug 1454914: Exempt web-extensions from same-site cookie policy. r=valentin,kmag 2018-04-19 20:00:37 +02:00
Gijs Kruitbosch 287e140005 Bug 1454956 - change scheme loop to use a range-based for loop, r=nwgh
MozReview-Commit-ID: C0a6urRjBzn

--HG--
extra : rebase_source : 98f16b7ed23d723e2b45b9625018ebcd4ed9c4a3
2018-04-19 16:13:00 +01:00
Gijs Kruitbosch e669847128 Bug 1447341 - stop querying prefs for fake protocols we use internally, r=nwgh
MozReview-Commit-ID: EXUupEKlsSM

--HG--
extra : rebase_source : 9df3048e6c24a6d9f8b38196903fe5d8450dbe01
2018-04-17 15:48:13 +01:00
Gijs Kruitbosch e932bbd4a3 Bug 1447341 - include blob, moz-extension and page-icon in list of known schemes, r=nwgh
MozReview-Commit-ID: HYiBCJ868nC

--HG--
extra : rebase_source : 57b3f39ebf41f4cad2719fc1f2b412e8dde6e491
2018-04-17 15:41:40 +01:00
Gijs Kruitbosch 1dbd3f74c6 Bug 1447341 - don't try to get a protocol handler for empty schemes, r=valentin
MozReview-Commit-ID: 3wJBC9TQsoV

--HG--
extra : rebase_source : d6581efc9c2cb75c51837c310a6f09cc88e14e64
2018-04-17 15:38:36 +01:00
Dorel Luca 0eedeeda32 Merge mozilla-central to autoland. CLOSED TREE 2018-04-18 14:07:45 +03:00
Christoph Kerschbaumer b4425d123c Bug 1454027 - Update SameSite cookie handling inside iframes.r=valentin 2018-04-17 18:25:59 +02:00
Valentin Gosu 8376d2c957 Bug 1399325 - Do not allow parsed URLs to exceed max length r=mayhemer
When normalizing the spec, some characters get percent encoded, so even if the original input was shorter than the max length, the final result could be longer.

MozReview-Commit-ID: 78IDM7Hoa55

--HG--
extra : rebase_source : b57caca6e5c55bf290b15e2f084e72e09f051c8f
2018-03-23 08:49:41 +01:00
Jeff Walden 821db93ccc Bug 1453456 - Replace nsCRT::IsAscii{Alpha,Digit} with mfbt/TextUtils.h versions. r=froydnj
--HG--
extra : rebase_source : b31986c0e6828be79442cfb0cf369eb80c232139
2018-04-12 20:19:30 -07:00
Christoph Kerschbaumer a1c92e2c53 Bug 1453814: Treat any cross-origin redirects as foreign for same-site cookies. r=valentin
--HG--
extra : source : 4d37ff0c232ebef0b1ac4fe79bc3b9833bcfa6ea
2018-04-13 15:42:00 +02:00
Andreea Pavel c98766975d Backed out 2 changesets (bug 1453814) for failing dom/base/test/chrome/test_bug884693.xul on a CLOSED TREE
Backed out changeset 86a4c50c98f6 (bug 1453814)
Backed out changeset 4d37ff0c232e (bug 1453814)
2018-04-13 20:19:39 +03:00
Christoph Kerschbaumer fc0f74afcb Bug 1453814: Treat any cross-origin redirects as foreign for same-site cookies. r=valentin 2018-04-13 15:42:00 +02:00
Valentin Gosu 223bfc4e68 Bug 1452417 - Hold a ref to mRequest in PACResolver::Notify. r=bagder
MozReview-Commit-ID: 1QeFlAiTCNt
2018-04-10 22:07:47 +02:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Christoph Kerschbaumer dadd18d654 Bug 1452496: Discard same-site cookie in cross site context. r=valentin 2018-04-12 12:52:51 +02:00
Andrea Marchesini fb3a154d2c Bug 1453015 - nsBufferedInputStream::Available must return NS_OK until its buffer contains data, r=mayhemer
If the underlying stream returns an error, this should not be propagated until
the internal buffer is not empty.
2018-04-12 07:27:54 +02:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Nathan Froyd 7bb7ffd8c9 Bug 1453134 - part 1 - add a string input stream constructor that accepts move references; r=baku
This method is more efficient when we know we're not going to need the
string afterwards, and should cut down on intermediate allocations.
2018-04-11 10:06:17 -04:00
Nika Layzell da7423dfa5 Bug 1444151 - Part 4: Remove the now-unnecessary xpcom-style segment getters, r=valentin 2018-04-10 17:49:50 -04:00
Nika Layzell 4f380cfe7d Bug 1444151 - Part 3: Only create a single allocation for MozURL objects, which is managed by rust, r=valentin
This patch rewrites the rust-url-capi crate as the mozurl crate, which
provides a threadsafe MozURL object which is compatible with the
previous MozURL class.

Creating a MozURL this way performs a single allocation, which contains
only a rust-url Url object and an atomic refcnt, however it is fully
compatible with the C++ RefPtr type.

This patch also exposes methods for accessing dependent substrings of
the serialized spec, meaning that string copies can be avoided in many
situations when inspecting attributes of the MozURL.




--HG--
rename : netwerk/base/rust-url-capi/.gitignore => netwerk/base/mozurl/.gitignore
2018-04-10 17:49:50 -04:00
Nika Layzell 9c3d9faeca Bug 1444151 - Part 1: Remove unused rust-url-capi tests, r=valentin 2018-04-10 17:49:49 -04:00
Nika Layzell 0c3ba13e4c Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -04:00
Nika Layzell b286bc10d9 Bug 1443379 - Stop pretending cacheKey can be anything other than uint32_t, r=smaug 2018-04-10 17:49:46 -04:00
Andrea Marchesini 06a6fb4d1b Bug 1451731 - Synchronize access to various stream classes' async wait callback reference - part 4 - PartiallySeekableInputStream, r=mayhemer 2018-04-10 17:33:09 +02:00
Andrea Marchesini 25021a1165 Bug 1451731 - Synchronize access to various stream classes' async wait callback reference - part 2 - nsMIMEInputStream, r=mayhemer 2018-04-10 17:33:08 +02:00
Andrea Marchesini 32490ee5b7 Bug 1451731 - Synchronize access to various stream classes' async wait callback reference - part 1 - nsBufferedInputStream, r=mayhemer 2018-04-10 17:33:08 +02:00
Tom Schuster b0dadb57b5 Bug 1452701 - Add pref to allow FTP subresources. r=ckerschb
--HG--
extra : rebase_source : 571060a866cc46ab253b0718d33dcbbd0f7e0a87
2018-04-09 21:07:01 +02:00
Andreea Pavel 26f640b36b Backed out 4 changesets (bug 1366808) for Windows GPU leakchecks on a CLOSED TREE
Backed out changeset 23f60e5acaa2 (bug 1366808)
Backed out changeset bf2262b6aca8 (bug 1366808)
Backed out changeset 1fc82af3a155 (bug 1366808)
Backed out changeset 0649f0d9884b (bug 1366808)
2018-04-10 05:11:36 +03:00
Stephen A Pohl 74fffa5d8b Bug 1366808: Add about:restartrequired page for situations when a background update has occurred and restarting Firefox is required to continue. r=felipe 2018-04-09 20:16:24 -04:00
Christoph Kerschbaumer b844c33ae2 Bug 1286861: Update CookieService to enforce same site cookies. r=valentin 2018-04-08 19:52:05 +02:00
Bobby Holley 2b985ab718 Bug 1451421 - Add a ToLowerCaseASCII utility method for nsAtom. r=hisvonen 2018-04-06 15:30:15 -07:00
Valentin Gosu 659634effe Bug 1451262 - Clear gSocketThread after finishing all operations so we don't trigger thread assertions r=mayhemer
MozReview-Commit-ID: AHMPd72S2GB

--HG--
extra : rebase_source : fe5fb1604e771f223d78f23fcf9d37b1f85763f9
2018-04-04 13:47:46 +03:00
Ciure Andrei 7208a2fee8 Merge inbound to mozilla-central. a=merge 2018-04-04 00:54:16 +03:00
Dave Townsend e2dffad4ac Bug 1448500: Add speculative request content policy type. r=bz, r=kmag
Adds a new TYPE_SPECULATIVE to nsIContentPolicy uses it as the type for
speculative connection channels from the IO service. I believe I've added it to
all the content policies in tree to make sure it behaves the same as TYPE_OTHER
used to.

The webextension test shows that the webextension proxy API sees speculative
lookups requested through the IO service.

MozReview-Commit-ID: DQ4Kq0xdUOD

--HG--
extra : rebase_source : d9460fdac118bc68f0db79749a16f181b580f2e7
2018-03-23 15:27:08 -07:00
Daniel Stenberg e443c66c37 bug 1447642 - no more DNSService restarts r=valentin
The DNS service was shutdown and restarted again in several scenarios,
for example when one of its prefs changed and by nsIOService when going
offline/online. The DNSService restart dragged the resolver, TRRService
and others with it and they too were thus restarted.

Most notably this hurt TRR resolving, as the restart caused short gaps
in time when there was no TRRService available and nsHostResolver
defaults to TRR Mode "native" if there's no TRRservice up, causing the
name resolver to occasionally use the wrong or unexpected resolver even
though TRR is enabled.

The resolver restart also flushed the DNS cache which is now avoided.

It is also a performance gain.

MozReview-Commit-ID: pp4Y8bNQJk

--HG--
extra : rebase_source : 9e3b3e6c0df16b8ca6287d8045f594026ae9ad6d
2018-03-21 14:35:53 +01:00
Henri Sivonen eb75469c5b Bug 1448755 - Use AssignLiteral and AssignASCII for short zero-terminated strings in networking. r=jduell.
MozReview-Commit-ID: HPzng5p6qkb

--HG--
extra : rebase_source : 20cec6b448c3152dddac5ac93d678745958a993a
2018-03-26 09:02:32 +03:00
Christoph Kerschbaumer 3739c23b85 Bug 1439713 - Add flag to loadinfo for skipping certain security policy checks. r=bz 2018-03-29 11:14:35 +02:00
Christoph Kerschbaumer a929955d1f Bug 1439713 - Change nsIContentPolicy shouldLoad to take an <uri, loadInfo> pair instead of the various args. r=bz 2018-03-29 12:16:23 +02:00
Nicholas Nethercote fd81947ea1 Bug 1448220 - Convert all network predictor VarCache prefs to the new StaticPrefList form. r=hurley
MozReview-Commit-ID: JiPbv84btDc

--HG--
extra : rebase_source : 46fb2b41d4233341166ced3a67100a086a7ffad7
2018-03-16 13:26:04 +11:00
Nathan Froyd 55e0321931 Bug 1448021 - make TicklerTimer's constructor explicit; r=valentin
Attempting to stand up the static analysis for Android builds revealed
that we weren't being explicit enough.
2018-03-27 10:51:32 -04:00
Bogdan Tara 302a55b534 Merge inbound to mozilla-central. a=merge 2018-03-27 12:12:57 +03:00
Henri Sivonen eaa2f6b46b Bug 1395114 - Remove nsIUnicharStreamLoader. r=emilio,michal
MozReview-Commit-ID: ECKNnJt80oK

--HG--
extra : rebase_source : 6f09937e0648c65d035dfb4935d6e9a06d0223df
2018-03-26 12:45:31 +03:00
Florian Quèze 02569d8da2 Bug 1448033 - Update the progress of downloading an update every 100ms, r=mcmanus. 2018-03-23 19:41:52 +01:00
Valentin Gosu 105a3dd952 Bug 1447194 - Use threadsafe refcounting in all nsIURI implementations r=mayhemer
It seem that only nsStandardURL and nsSimpleURI (and classes that inherit them) do not have threadsafe refcounting yet.

MozReview-Commit-ID: J8gLoBSPCTl

--HG--
extra : rebase_source : 0e1659c28b18909e31b2e3e74baf74edf1e100c8
2018-03-20 15:51:17 +01:00
Valentin Gosu 83e7f0c0ea Bug 1447190 - Remove internal mutability from nsStandardURL r=mayhemer
* Removes mSpecEncoding since the spec is always ASCII encoded
* nsStandardURL::InitGlobalObjects is now called from nsNetStartup
* Removes prefObserver from nsStandardURL
* mDisplayHost is now initialized every time that we change the hostname
* Adds locking to the gAllURLs list

MozReview-Commit-ID: 93mwECxYxWl
* * *
[mq]: overfix

MozReview-Commit-ID: 98nyTYa5ZeR

--HG--
extra : rebase_source : 82045e10771038d7168d1f235143c24c72dd5a45
2018-03-22 02:59:32 +01:00
Boris Zbarsky d989f864ea Bug 1444143 part 14. Rename nsIFrameLoader.idl to nsIFrameLoaderOwner.idl. r=mystor
MozReview-Commit-ID: 1XpEjoFLSQh

--HG--
rename : dom/base/nsIFrameLoader.idl => dom/base/nsIFrameLoaderOwner.idl
2018-03-21 22:43:17 -04:00
Boris Zbarsky 9cb6df0dac Bug 1444143 part 2. Remove nsIFrameLoader::GetDocShell. r=mystor
The change from "docShell" to "mDocShell" for the SetName call in the
OwnerIsMozBrowserFrame case in nsFrameLoader::MaybeCreateDocShell is a
drive-by correctness fix for a bug the rename of "docShell" to "parentDocShell"
caught: setting the name of our _parent_ docshell based on the name attr of our
owner makes no sense.

MozReview-Commit-ID: DwnWt8jTokV
2018-03-21 22:43:15 -04:00
Valentin Gosu ed088d0c3e Bug 1416791 - Eliminate mutability from nsHostObjectURI by removing nsIURIWithBlobImpl r=baku
* blobImpl references are now only kept in nsHostObjectProtocolHandler
* removes nsHostObjectProtocolHandler.idl
* Makes nsHostObjectURI no longer inherit from nsSupportsWeakReference

MozReview-Commit-ID: AC1klrfsMnn

--HG--
extra : rebase_source : 142802f9a6fa6aae5611dccf117d88f96a9985a6
2018-03-21 15:33:15 +01:00
Valentin Gosu eccc344c51 Bug 1442242 - Make the constuctors of URI implementations private r=mayhemer
MozReview-Commit-ID: LonNnZyJjVO

--HG--
extra : rebase_source : ceefc81a669b17f68f193fce5f172f9f2268a998
2018-03-20 23:23:31 +01:00
Valentin Gosu d4bfa7921c Bug 1442242 - Add nsIURIMutator method to mark when the URI implementation should support nsIFileURL r=mayhemer
* This is needed in order to make the constructors of URI implementations private

MozReview-Commit-ID: 8dddDXbmrfF

--HG--
extra : rebase_source : b8e471d228617ae4bd07c5ed6317951c06ce8d56
2018-03-20 12:52:43 +01:00
Valentin Gosu 87857475e6 Bug 1433609 - Ensure that deserialized URL is correct r=mayhemer
MozReview-Commit-ID: BMQfPzPhDhc
2018-02-14 14:40:05 +01:00
Andrea Marchesini 41b639fbc7 Bug 1448795 - nsMIMEInputStream must call OnInputStreamReady() with the correct nsIAsyncInputStream, r=asuth 2018-03-26 19:06:31 +02:00
Andreea Pavel d9d9517a78 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-03-20 00:42:18 +02:00
David Keeler aa1464d4a7 bug 1444265 - break a potential cycle in BackgroundFileSaver to prevent leaks r=jduell
BackgroundFileSaver holds a reference to its nsIBackgroundFileSaverObserver
(observer). If such an observer has an enclosure that captures the
BackgroundFileSaver itself (as in test_backgroundfilesaver.js), this causes a
cycle that won't be caught by the cycle collector. Thus, we have to manually
break the cycle when we're done with the observer (in
BackgroundFileSaver::NotifySaveComplete). Note that this currently relies on the
fact that this implementation requires that Finish always be called (see remarks
in nsIBackgroundFileSaver.idl).

MozReview-Commit-ID: GOO9q2vFRso

--HG--
extra : rebase_source : f62b0ec513e0b681da3e76c0af31077d2fa03fea
extra : amend_source : 2b3a11d4b17df10705bad38e02b6ce130b456448
2018-03-14 15:02:49 -07:00
Honza Bambas f5cc301b66 Bug 1446117 - Make sure we also mark timeout epoch on a network socket when we are polling it for read/write, fix regression from bug 1444160. r=valentin 2018-03-19 07:48:00 -04:00
Honza Bambas c940bbdf06 Bug 1430659 - Network requests in "blocked" state for long time (1+ minute) when ipv6 hosts are no longer available. r=valentin 2018-03-16 09:06:00 -04:00
Valentin Gosu af5eeff2e3 Bug 1442239 - Make URI deserialization (nsISerializable.read) happen via nsIURIMutator only r=mayhemer
* Deserialization now only happens via a mutator
* The CID for URI implementations actually returns the nsIURIMutator for each class
* The QueryInterface of mutators implementing nsISerializable will now act as a finalizer if passed the IID of an interface implemented by the URI it holds

MozReview-Commit-ID: H5MUJOEkpia

--HG--
extra : rebase_source : 01c8d16f7d31977eda6ca061e7889cedbf6940c2
2018-03-19 20:22:32 +01:00
Andreea Pavel e5950c0d39 Backed out 2 changesets (bug 1442239) for xpcshell failures at widget/tests/unit/test_taskbar_jumplistitems.js on a CLOSED TREE
Backed out changeset 513cd669aca1 (bug 1442239)
Backed out changeset aef4c73f736f (bug 1442239)
2018-03-19 21:19:26 +02:00
Valentin Gosu f0c7a1ae13 Bug 1442239 - Make URI deserialization (nsISerializable.read) happen via nsIURIMutator only r=mayhemer
* Deserialization now only happens via a mutator
* The CID for URI implementations actually returns the nsIURIMutator for each class
* The QueryInterface of mutators implementing nsISerializable will now act as a finalizer if passed the IID of an interface implemented by the URI it holds

MozReview-Commit-ID: H5MUJOEkpia

--HG--
extra : rebase_source : 8ebb459445cab23288a6c4c86e4e00c6ee611e34
2018-03-08 13:35:10 +01:00
Jonathan Kingston 10ebc30d5d Bug 1440701 - Adding in telemetry for upgrading display content. r=ckerschb,valentin
MozReview-Commit-ID: 7oEIith4Ehv

--HG--
extra : rebase_source : 454d56277aa5dc08bf8cfd7cd9c1e24d31014838
2018-03-04 14:33:33 +00:00
Tom Ritter 9c3d32ebab Bug 1444490 Declare classses (and one method) in network/ final to reduce virtual function calls r=nwgh
MozReview-Commit-ID: 4oaazbPhpbc

--HG--
extra : rebase_source : 7c01066363605c64fc76332686b2c4d9c2af6518
2018-03-09 08:37:18 -06:00
Andrea Marchesini 5784769019 Bug 1443079 - nsScriptError.isFromPrivateWindow must match the correct value also in e10s mode, r=smaug 2018-03-13 06:40:38 +01:00
Nicholas Nethercote 439e258873 Bug 1438433 - Make network.predictor.cleaned-up a non-VarCache pref. r=hurley.
mCleanedUp is a VarCache variable, which mirrors the canonical value of the
network.predictor.cleaned-up pref. When the canonical pref value is modified,
e.g. by SetBool(), then mCleanedUp is also updated.

But the updating relationship is one-way -- if mCleanedUp is modified, the
canonical value of the pref is not updated. Such an inconsistency is bad! For
example, Predictor.cpp will use mCleanedUp's value, but about:config will show
the canonical value.

(For this reason, VarCache prefs are meant to be read-only outside of libpref.
Bug 1436655 will enforce this.)

This patch changes mCleanedUp so it's not a VarCache variable, avoiding the
mirroring issue.

MozReview-Commit-ID: LIG02gMkRjF

--HG--
extra : rebase_source : 273b2372ce718b0f346695a0dc96a189cd3ba233
2018-03-13 13:06:30 +11:00
Nicholas Nethercote f87fadb9cb Bug 1438433 - Remove the network.predictor.redirect-likely-confidence pref. r=hurley.
It's unused.

MozReview-Commit-ID: DmHwJ3oW3Vq

--HG--
extra : rebase_source : 89d49a7d680e07383de82c2b4cb3a74a13f09c1e
2018-03-07 15:50:14 +11:00
Honza Bambas ea33c31195 Bug 1444160 - Fix calculation of network socket timeout logic. r=valentin, mayhemer 2018-03-12 07:00:00 +02:00
Daniel Stenberg 20d398643b bug 1441256 - bypass cache when retrying connection without TRR r=mcmanus,valentin
Otherwise it will just load back the same (problematic) addresses from the
cache again the second time. This introduces a new resolver bit
(REFRESH_CACHE) that also invalidates the existing cache entry while doing the
new resolve.

MozReview-Commit-ID: 5Bc2KiAGYYA

--HG--
extra : rebase_source : ae368c88a5db27f0980b9928439d27588bc84815
2018-03-06 14:50:21 +01:00
Honza Bambas 8aaa7351b0 Bug 1438935 - Serialize selected LoadInfo properties from HTTPChannelParent to HTTPChannelChild through OnStartRequest and Redirect1Begin, r=asuth
--HG--
extra : rebase_source : 6d93112fbd0bcd9562094a05c70cb02e0c3bb4b9
2018-03-06 08:07:00 +02:00
Cosmin Sabou ed1b2a8736 Backed out 4 changesets (bug 1437167) for build bustages on nsUpdateDriver.cpp and WindowsMessageLoop.cpp on a CLOSED TREE.
Backed out changeset b98740e7c639 (bug 1437167)
Backed out changeset 4476e8f51fa6 (bug 1437167)
Backed out changeset c79dc40faa41 (bug 1437167)
Backed out changeset b608d2dcbb86 (bug 1437167)
2018-03-06 00:09:46 +02:00
Nika Layzell 262be91f75 Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj
MozReview-Commit-ID: BN18I8Q6c7S
2018-03-05 16:00:00 -05:00
Valentin Gosu 34872b6d20 Bug 1441688 - Remove nsIIPCSerializableURI.Deserialize r=mayhemer
MozReview-Commit-ID: 8gwX3vSKWNX

--HG--
extra : rebase_source : a2c21a7e66aa8be3c2e345ca64feea967b380491
2018-03-05 04:14:44 +01:00
Valentin Gosu f102a081b2 Bug 1434163 - Make all nsIURI attributes readonly r=mayhemer
MozReview-Commit-ID: KtjO8VWjPF5

--HG--
extra : rebase_source : 061a6db73e36b3a0b3732d44379bbc10e8268f9a
2018-02-27 00:07:48 +01:00
Kirk Steuber 06cca893ea Bug 1442429 - Correct the documentation for nsIBrowserSearchService::addEngineWithDetails r=mkaply
MozReview-Commit-ID: EryCTRT5t5I

--HG--
extra : rebase_source : c771bebb9fe894390ea272ca4259a9847aeaaa8a
2018-03-01 14:13:51 -08:00
Sebastian Hengst 769222fadf merge mozilla-inbound to mozilla-central. a=merge
--HG--
rename : browser/base/content/tabbrowser.xml => browser/base/content/tabbrowser.js
2018-02-28 12:54:12 +02:00
Andrea Marchesini 18cabbba7b Bug 1431646 - Adding a completed boolean to know if the operation is completed in NS_ReadInputStreamToBuffer(), r=smaug 2018-02-28 07:14:41 +01:00
Andrea Marchesini 4ce2708b72 Bug 1441502 - nsBufferedInputStream should not change the exposed interfaces, r=smaug 2018-02-28 07:14:41 +01:00
Nathan Froyd c821ec9351 Bug 1441584 - part 1 - declare inner URI Mutator classes final; r=valentin
For documentation purposes and to assist the compiler.
2018-02-27 20:13:57 -05:00
Valentin Gosu 823bcbf677 Bug 1434766 - Make nsIFileURL attributes readonly r=mayhemer
MozReview-Commit-ID: AN5EzyuuKuJ

--HG--
extra : rebase_source : 20794ce1c867915b4cae71b7abb9dcdca27fd290
2018-02-26 05:24:09 +01:00
arthur.iakab 17cd218519 Backed out changeset 56336c4873fe (bug 1434766) for build bustages on a CLOSED TREE 2018-02-27 17:14:15 +02:00
Valentin Gosu f77fba2c4c Bug 1434766 - Make nsIFileURL attributes readonly r=mayhemer
MozReview-Commit-ID: AN5EzyuuKuJ

--HG--
extra : rebase_source : 2d986fa39930469472f24a208d9b06650ddb78f4
2018-02-26 05:24:09 +01:00
Valentin Gosu 2a78b51a84 Bug 1433958 - If setting the host succeeds, SetHostPort should not return an error code r=mayhemer
WebPlatformTests expect that when calling
url.host = "host:" // port missing
url.host = "host:65536" // port too big
url.host = "host:bla" // invalid port
that the hostname will be set, but the port will be left unchanged.
Since DOM APIs are the only consumers for SetHostPort it means we can change this behaviour to match the WPT expectations.
As such, SetHostPort will return NS_OK if setting the host succeded, and will ignore if setting the port failed.

MozReview-Commit-ID: LoMw8hCWlCv

--HG--
extra : rebase_source : db28b73d98060c2f66f899afe1a4ae26f4db85db
2018-02-26 20:43:47 +01:00
Valentin Gosu 139db586dc Bug 1433958 - Don't fail when setting an empty password if the username is already empty r=mayhemer
We normally fail in nsStandardURL::SetPassword if the username is empty.
But if the password we are trying to set is also empty, we should't really fail.

MozReview-Commit-ID: FIDqkPrb1gp

--HG--
extra : rebase_source : 9080c44e91e27acd210f3ace3a234528513928c3
2018-02-26 20:43:46 +01:00
Valentin Gosu a49f1ae73b Bug 1433958 - Make NS_MutateURI methods warn immediately after calling method that fails r=mayhemer
Calling NS_ENSURE_SUCCESS at the begining of the methods shows the error in the console, but what we really care about is where the error code comes from. So it is best to use if (NS_FAILED(mStatus) {} at the begining of the methods, and NS_ENSURE_SUCCESS right after calling the appropriate method on mMutator.

MozReview-Commit-ID: 5vVuHk3N4FU

--HG--
extra : rebase_source : f477f0f87b3303422a595f27d9b39ac25335d701
2018-02-26 20:43:45 +01:00
Valentin Gosu 76fe90c6ed Bug 1433958 - Change code that uses nsIURI.setHostAndPort() to use nsIURIMutator r=mayhemer
* Removes setHostAndPort from nsIURIMutator as it only has one use
* Instead, the consumer sets the port to -1 before calling setHostPort()

MozReview-Commit-ID: Jx9UMW440hq

--HG--
extra : rebase_source : cb60e76c905db6bb308ddfd8fa548cc13d3afe06
2018-02-26 20:43:45 +01:00
Valentin Gosu a60ce32b46 Bug 1439931 - nsIIOService.extractScheme/net_ExtractURLScheme should lowercase its output r=mayhemer
MozReview-Commit-ID: LZ2rqIdIoXQ

--HG--
extra : rebase_source : 3d9973f0001ddc2d98cad0ddddb646cedac489c7
2018-02-26 16:42:27 +01:00
Florian Quèze 682b1ec3b2 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
Daniel Stenberg 9165893084 bug 1440234 - show TRR column in about:networking for DNS names r=baku,valentin
MozReview-Commit-ID: LtAHJj4BMqQ

--HG--
extra : rebase_source : 089544e53e652aa8d43f0927e6d140568f68e93f
2018-02-22 09:57:22 +01:00
Gurzau Raul 2a77281049 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-02-21 19:30:44 +02:00
Christoph Kerschbaumer a6c1ffb498 Bug 1434357: Exempt Web Extensions from insecure redirects to data: URIs. r=kmag,mayhemer 2018-02-18 19:52:52 +01:00
Jonathan Kingston 8afc412494 Bug 1435733 - Upgrade mixed display content pref. r=baku,ckerschb,francois,mayhemer
MozReview-Commit-ID: ETIgVF3zhRu

--HG--
extra : rebase_source : e4c59f50584158f4b31527347b10424b56692fa1
2018-02-05 15:37:27 +00:00
Gurzau Raul 082f8e6d89 Merge inbound to mozilla-central. a=merge 2018-02-21 12:01:33 +02:00
Valentin Gosu 55a7a824c6 Bug 1435671 - Reduce binary size by making NS_MutateURI.Apply not be a templated method r=mayhemer
We instead add a templated method NS_MutatorMethod that returns a std::function<nsresult(nsIURIMutator*)> which Apply then calls with mMutator as an argument.
The function returned by NS_MutatorMethod performs a QueryInterface, then calls the passed method with arguments on the result.

MozReview-Commit-ID: Jjqp7gGLG1D

--HG--
extra : rebase_source : f2a17aee7bb66a7ba8652817d43b9aa7ec7ef710
2018-02-21 01:00:54 +01:00
nbeleuzu@mozilla.com 01eef6aff1 Backed out changeset c9dcce0a1068 (bug 1435671) for build bustages on nsIURIMutator.h. CLOSED TREE 2018-02-21 00:06:46 +02:00
Valentin Gosu f1850e9354 Bug 1435671 - Reduce binary size by making NS_MutateURI.Apply not be a templated method r=mayhemer
We instead add a templated method NS_MutatorMethod that returns a std::function<nsresult(nsIURIMutator*)> which Apply then calls with mMutator as an argument.
The function returned by NS_MutatorMethod performs a QueryInterface, then calls the passed method with arguments on the result.

MozReview-Commit-ID: Jjqp7gGLG1D

--HG--
extra : rebase_source : 592d13349a8c4627c7ce3146ec592f577b39f3cc
2018-02-20 22:39:40 +01:00
Josh Matthews 91522ab384 Bug 1437140 - Replace some uses of NS_DispatchToMainThread/NS_DispatchToCurrentThread with more specific event targets. r=mystor 2018-02-20 09:52:32 -05:00
Nathan Froyd a51fed2b98 Bug 1439362 - make nsBase64Encoder slightly less malloc-happy; r=valentin
nsBase64Encoder::Finish currently works by calling PL_Base64Encode to
allocate a base64-encoded string, then Assign()'ing that to the result
string, another allocation.  mozilla::Base64Encode enables us to base64
encode directly into the result string with a single allocation, saving
an allocation.  (Base64Encode is also slightly more efficient, because
we don't have to do a strlen() on the string being Assign()'d.)  Let's
use Base64Encode instead.
2018-02-19 10:28:00 -05:00
Christoph Kerschbaumer 494f074b53 Bug 1432358: Allow certain top-level pages to be agnostic to CSP. r=smaug
--HG--
extra : source : 27527f95cccca4927d4fee56b0dab9af11c5733f
extra : intermediate-source : 2fa11c525da3d0c7ca58a593241c1902f2849528
2018-02-01 14:07:01 +01:00
Chris Peterson 0129d900f3 Bug 1436263 - Part 2: Replace `override final` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: 70gt5SUu4Dv

--HG--
extra : rebase_source : 71912c6bde22aaed01e70615a4ee794a36e70d0e
extra : source : 1c22d4c65d70b797ee3e963ec426c90e1f89b5e3
2018-02-05 22:50:00 -08:00
Nathan Froyd 8cb82739a9 Bug 1438673 - avoid some refcounting when initializing URIs from mutators; r=valentin
We only eliminate one refcount, but less refcounting is less refcounting.
2018-02-16 10:31:43 -05:00
Daniel Stenberg e5d3226694 bug 1434852 - introducing TRR (DOH); r=mcmanus,valentin
Provides an optional resolver mechanism for Firefox that allows running
together with or instead of the native resolver.

TRR offers resolving of host names using a dedicated DNS-over-HTTPS server
(HTTPS is required, HTTP/2 is preferable).

DNS-over-HTTPS (DOH) allows DNS resolves with enhanced privacy, secure
transfers and improved performance.

To keep the failure rate at a minimum, the TRR system manages a dynamic
persistent blacklist for host names that can't be resolved with DOH but works
with the native resolver. Blacklisted entries will not be retried over DOH for
a couple of days. "localhost" and names in the ".local" TLD will not be
resolved via DOH.

TRR is preffed OFF by default and you need to set a URI for an available DOH
server to be able to use it. Since the URI for DOH is set with a name itself,
it may have to use the native resolver for bootstrapping. (Optionally, the
user can set the IP address of the DOH server in a pref to avoid the required
initial native resolve.)

When TRR starts up, it will first verify that it works by checking a
"confirmation" domain name. This confirmation domain is a pref by default set
to "example.com". TRR will also by default await the captive-portal detection
to raise its green flag before getting activated.

All prefs for TRR are under the "network.trr" hierarchy.

The DNS-over-HTTPS spec: https://tools.ietf.org/html/draft-ietf-doh-dns-over-https-03

MozReview-Commit-ID: GuuU6vjTjlm

--HG--
extra : rebase_source : 53fcca757334090ac05fec540ef29d109d5ceed3
2018-02-01 10:20:49 +01:00
Nathan Froyd 0f56acaf26 Bug 1437604 - remove NS_INTERFACE_MAP_END_THREADSAFE; r=mystor
This macro is identical to NS_INTERFACE_MAP_END and encourages the
reader to think that there's something extra-special threadsafe about QI
implementations that use the macro, when in reality there's nothing of
the sort.
2018-02-12 14:36:46 -05:00
Eric Rahm 1828d1aec0 Bug 1384638 - Remove another NS_ENSURE warning from ShouldEnableTracking. r=gcp
--HG--
extra : rebase_source : 2d97a2279e6f5927b884b21158e91d31216c5626
2018-02-09 16:32:41 -08:00
Sebastian Hengst a6cab8c4e8 Backed out 4 changesets (bug 1432358) for failing xpcshell's test_ext_contentscript_triggeringPrincipal.js
Backed out changeset ef7b8eef07c1 (bug 1432358)
Backed out changeset 2fa11c525da3 (bug 1432358)
Backed out changeset a67e95bd0ccf (bug 1432358)
Backed out changeset 91c948c94506 (bug 1432358)
2018-02-12 19:58:28 +02:00
Andrea Marchesini 012ea0dbf2 Bug 1437152 - NS_ReadInputStreamToString doesn't reallocate the string if the size is passed, r=me 2018-02-12 18:49:36 +01:00
Andrea Marchesini fd3aec925b Bug 1437152 - NS_ReadInputStreamToString doesn't reallocate the string if the size is passed, r=froydnj 2018-02-12 17:40:17 +01:00
Christoph Kerschbaumer 8c6aa97797 Bug 1432358: Allow certain top-level pages to be agnostic to CSP. r=smaug
--HG--
extra : source : 27527f95cccca4927d4fee56b0dab9af11c5733f
2018-02-01 14:07:01 +01:00
Kathy Brade e072bef056 Bug 1432907 - Disable network tickler with proxy bypass protection r=mayhemer
--HG--
extra : rebase_source : 179446335cd78ad5dc7b5b821696a7245aeef4f1
2018-02-06 22:07:00 +02:00
Sebastian Hengst 2e7425adfb Backed out 3 changesets (bug 1432358) for failing xpcshell's test_ext_contentscript_triggeringPrincipal.js on Windows debug. CLOSED TREE
Backed out changeset 27527f95cccc (bug 1432358)
Backed out changeset 6840396ed6ec (bug 1432358)
Backed out changeset 60852dec9e04 (bug 1432358)

--HG--
extra : amend_source : 3308e1d9a98220fc71027f18e5c69105e8d75d20
2018-02-09 23:46:29 +02:00
Christoph Kerschbaumer 1a2da7cf6b Bug 1432358: Allow certain top-level pages to be agnostic to CSP. r=smaug 2018-02-01 14:07:01 +01:00
Honza Bambas 7c8e2fe79d Bug 1152332 - Let connection proxy filters return the result asynchronously - core changes, r=michal 2018-02-08 07:18:00 +02:00
Andrea Marchesini 1126b00aed Bug 1405974 - NonBlockingAsyncInputStream must take the ownership of the underlying stream, r=qdot 2018-01-31 16:45:20 +01:00
Andrea Marchesini 67fac604a1 Bug 1371699 - Use of NonBlockingAsyncInputStream in our code base, r=froydnj 2018-01-31 16:45:20 +01:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Valentin Gosu 3c233e8b30 Bug 1432519 - Make nsIURL attributes readonly r=mayhemer
MozReview-Commit-ID: KuPILT7rX6N

--HG--
extra : rebase_source : 75b84d74d74539ed3b178480cfa0aa37cfc9d947
2018-01-31 03:06:58 +01:00
Valentin Gosu 2cf8889195 Bug 1432257 - Remove nsIStandardURL setter methods r=mayhemer
* Removes nsIStandardURL.{init,setDefaultPort} as these have been migrated to nsIStandardURLMutator

MozReview-Commit-ID: 7JPZmyEr65h

--HG--
extra : rebase_source : 5c40f1ff8eff0f73b54fb148923bab7b8b2270a7
2018-01-22 20:20:18 +01:00
David Keeler 087f092867 bug 1421084 - part 4/4 - remove nsNSSShutDown.h and (hopefully) all references to it r=mt,ttaubert
MozReview-Commit-ID: 2mhvHsC5Nil

--HG--
extra : rebase_source : 651c2bcf8655f75756ea2bac788eb8c0781dc90a
2018-01-24 14:44:01 -08:00
David Keeler ad5cec4768 bug 1421084 - part 3/4 - remove nsNSSShutDownObject::shutdown and virtualDestroyNSSReference r=mt,ttaubert
MozReview-Commit-ID: ErL7ZjAGVVC

--HG--
extra : rebase_source : 2869aafaef729f0ad190f957919e8b9c40700477
2018-01-24 14:29:08 -08:00
David Keeler a0e34baf27 bug 1421084 - part 2/4 - remove nsNSSShutDownObject::isAlreadyShutDown() r=mt,ttaubert
MozReview-Commit-ID: DlS16pHE0Ik

--HG--
extra : rebase_source : d7596a3571478adefae4ffa5d446ff5234ba9ed7
2018-01-23 12:22:56 -08:00
David Keeler e8cc0ba1ce bug 1421084 - part 1/4 - remove now-unnecessary nsNSSShutDownPreventionLock r=mt,ttaubert
As of bug 1417680, the NSS shutdown tracking infrastructure is unnecessary (and
does nothing anyway). This series of changesets removes the remaining pieces in
a way that is hopefully easy to confirm is correct.

MozReview-Commit-ID: 8Y5wpsyNlGc

--HG--
extra : rebase_source : ef6b481510d949e404a4ef5615097d66e566c947
2018-01-23 10:37:47 -08:00
Valentin Gosu 033570496c Bug 1432602 - Add nsIFileURLMutator.setFile() r=mayhemer
MozReview-Commit-ID: EF2vVYoN8bg

--HG--
extra : rebase_source : 5d2b6fa353f0a0eb189fd08f9fda2bbf1ced30bb
2018-01-31 22:40:45 +01:00
Bogdan Tara 1a6614b8b5 Merge inbound to mozilla-central. a=merge 2018-01-31 12:00:14 +02:00
Nicholas Nethercote 5c975c03b1 Bug 1433982 - Make nsAtomicFileOutputStream::DoOpen() fail if the file is read-only. r=glandium
This means we don't leave behind prefs-<n>.js files when prefs.js is read-only.

MozReview-Commit-ID: H6KKnoYGdhH

--HG--
extra : rebase_source : 263dd6fb75204a4565c8af89e7b21fc37a10d52e
2018-01-31 10:01:26 +11:00
Valentin Gosu d4c640e9f7 Bug 1432320 - (Part 1) Add nsIURLMutator r=mayhemer
MozReview-Commit-ID: 8GYru46kFQE

--HG--
extra : rebase_source : 064fae8d2e31db071da524b1946f135dda01cc1a
2018-01-31 02:32:27 +01:00
Kris Maglione 918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione 6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Masatoshi Kimura 32bbccbd78 Bug 685236 - Stop using GetNativePath in netwerk/. r=mayhemer
MozReview-Commit-ID: JdHhXPiS0fv

--HG--
extra : source : ef77ec8c110852b74e251c28753467a79bad7d2a
extra : intermediate-source : 7e5b9d09196916daac73b23c58c6fe870f223970
2017-12-15 20:21:19 +09:00
Andrea Marchesini c6da271117 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug
* * *
Bug 1425458 - Resource timing entries Workers - part 10 - Correct parameters in NS_NewChannel in nsDataObj.cpp, r=me
2018-01-24 17:17:31 +01:00
Kris Maglione aec63e140c Backed out 3 changesets (bug 1431533) for Android mochitest bustage. CLOSED TREE
MozReview-Commit-ID: 5ubE9EMQpZ9

--HG--
extra : histedit_source : df68d7595925c07d9d6e8bacc2c46e69556f479a%2C72b768b9825e20ede6603ead75f871c50dc041f7
2018-01-24 22:04:59 -08:00
Kris Maglione 30b3a49bfd Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
MozReview-Commit-ID: 8V1ZT53ReiP

--HG--
extra : rebase_source : 12b5f8c3e125111db7382eb3d7d20a99fb2c35b3
extra : absorb_source : e99fa7f6eee02e7e6cadeb898c7fcf6dac9c902a
extra : histedit_source : d0dfc31fadc2b81d341c9d0cd1efec02923c003b
2018-01-24 15:48:47 -08:00
Narcis Beleuzu 9279994eae Merge inbound to mozilla-central. a=merge 2018-01-24 23:56:14 +02:00
Valentin Gosu 0ec04b6d9e Bug 1432187 - Add missing SubstitutingURL::Mutator r=mayhemer
* Makes the implementation of nsStandardURL::Mutator into a template called TemplatedMutator<T>
* Makes both nsStandardURL::Mutator and SubstitutingURL::Mutator extend TemplatedMutator<T>

MozReview-Commit-ID: EpxFpBkrdSK

--HG--
extra : rebase_source : 07d568ff84fb199c7549ae5f402e01e4b86c1c37
2018-01-24 20:33:06 +01:00
Valentin Gosu b53812bfed Bug 1432187 - Change code to use nsIStandardURLMutator.{init,setDefaultPort} r=mayhemer
MozReview-Commit-ID: K2Uy9ET3Ay6

--HG--
extra : rebase_source : fb5e19bc7b71a6f0264471bf8f07febf1bc55900
2018-01-24 20:33:02 +01:00
Valentin Gosu 358af2c859 Bug 1432187 - Add nsIStandardURLMutator interface r=mayhemer
MozReview-Commit-ID: 4IbdO2gMwox

--HG--
extra : rebase_source : 4f64f44bc1f8e8ee4538c7624f00ab76cc914fae
2018-01-23 23:13:04 +01:00
Nika Layzell 074c9ae117 Bug 1428922 - Part 0: Add an EXPIRE_POLICY expire type to nsPermissionManager, r=baku
MozReview-Commit-ID: JJm7g2GSIjT
2018-01-24 01:07:10 -02:00
Tom Schuster 37c5443f1e Bug 1283427 - Remove SEC_NORMAL completely. r=ckerschb
--HG--
extra : rebase_source : 09099a01a8812a575e455dbd09a04ebe43309e43
extra : histedit_source : 8e0159f9c25fa86e3519b8e17b8ad9924e0351ad
2018-01-22 16:35:01 +01:00
Tom Schuster 20c26f512e Bug 1283427 - Remove SEC_NORMAL from NetUtil.newChannel. r=ckerschb
--HG--
extra : rebase_source : fb1d82a6a6b3ad0d9d4e9a8ed3bb4da762d55a97
extra : histedit_source : a975038b29b871ffe77ee4353a9bcdee2f73ee5b
2018-01-20 17:32:18 +01:00
Ben Kelly 322046c942 Bug 1231211 P12 Allow the ClientInfo and ServiceWorkerDescriptor to be passed to NS_NewChannel() for principal based loads. r=valentin 2018-01-23 10:38:54 -05:00
Ben Kelly 2dc82400a7 Bug 1231211 P7 Pass the nsIChannel to ShouldPrepareForIntercept(). r=asuth 2018-01-23 10:38:53 -05:00
Ben Kelly 1e076dddea Bug 1231211 P6 Automatically set the controller on the LoadInfo for subresource requests. r=asuth 2018-01-23 10:38:52 -05:00
Ben Kelly 9225189e3a Bug 1231211 P3 Serialize LoadInfo's mClientInfo, mReservedClientInfo, and mReservedClientInfo members across IPC. r=valentin 2018-01-23 10:38:52 -05:00
Ben Kelly 8e535f8460 Bug 1231211 P2 Pass the controller ServiceWorkerDescriptor on the channel LoadInfo and back in PHttpChannel's OnStartRequest message. r=valentin 2018-01-23 10:38:52 -05:00
Ben Kelly 8d4bfc7c66 Bug 1231211 P1 Allow docshell reload state to be set on LoadInfo. r=valentin 2018-01-23 10:38:51 -05:00
Valentin Gosu a48c8f1ada Bug 1431760 - Add NS_MutateURI.Apply that allows calling methods declared in other interfaces implemented by NS_MutateURI::mMutator r=mayhemer
* The method can be chained just as the other methods on NS_MutateURI.
* In case the mutator object does not implement the interface, mStatus will be set to an error code.
* This is useful when you are constructing a new URI and the type of the mutator is known. I expect a future patch will add a MaybeApply method, that does not set mStatus to an error code if the mutator does not implement the interface.
* This patch changes nsHostObjectProtocolHandler::NewURI to use the new method and avoid a static_cast<nsHostObjectURI*>(uri)


MozReview-Commit-ID: 9kvXJX54gUP

--HG--
extra : rebase_source : 2a27778ec583251fac26c74d78125bd7266d6d87
2018-01-22 15:52:37 +01:00
Luke Crouch 111ae8a75d Bug 587523 - rename referer.userControlPolicy to referer.defaultPolicy r=valentin
MozReview-Commit-ID: A2hkYfdTCR9

--HG--
extra : rebase_source : 6d3775da80338b66eee44f13ba177f29933dd114
2018-01-10 16:51:10 -06:00
Luke Crouch 878706a5f8 Bug 587523 - strict-origin-when-cross-origin referer policy in pbmode r=valentin
Adds new network.http.referer.defaultPolicy.pbmode pref which defaults to 2.

When setting referrer from default policy, checks mLoadInfo OriginAttributes
for mPrivateBrowsingId > 0 to detect PBM.

MozReview-Commit-ID: 7SfNk0dO1rW

--HG--
extra : rebase_source : a050a61cad005740edde99f846a69c6a7568dbc6
2018-01-10 16:33:52 -06:00
Gurzau Raul b7e3ec2468 Merge inbound to mozilla-central. a=merge 2018-01-20 11:38:58 +02:00
Andrea Marchesini 7aba2c3fd5 Bug 1430931 - mark nsIArrayBufferInputStream as thread-safe, r=smaug 2018-01-19 13:31:18 +01:00
Dragana Damjanovic dd.mozilla@gmail.com da357cb9bc Bug 1430768 - Refine TFO telemetry. r=mcmanus 2018-01-17 06:47:00 +02:00
Valentin Gosu ea4e6b68ff Bug 1431204 - Make nsIURI.spec readonly r=mayhemer
MozReview-Commit-ID: 1l1CBUotIPh

--HG--
extra : rebase_source : 92af70ad412719d93222551b658f313cefd85e75
2018-01-19 15:26:07 +01:00
Valentin Gosu da90b10e9f Bug 1431204 - Change calls to nsIURI.spec setter to use nsIURIMutator instead r=mayhemer
* changes call to use nsIURIMutator.setSpec()
* Add new NS_MutateURI constructor that takes new Mutator object
* Make nsSimpleNestedURI::Mutate() and nsNestedAboutURI::Mutate() return mutable URIs
* Make the finalizers for nsSimpleNestedURI and nsNestedAboutURI make the returned URIs immutable

MozReview-Commit-ID: 1kcv6zMxnv7

--HG--
extra : rebase_source : 99b13e9dbc8eaaa9615843b05e1539e19b527504
2018-01-19 15:19:42 +01: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 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
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
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
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
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