Commit Graph

5461 Commits

Author SHA1 Message Date
Coroiu Cristina
71432717b8 Merge mozilla-central to autoland a=merge on a CLOSED TREE 2018-08-31 19:18:33 +03:00
Liang-Heng Chen
7206b4243b Bug 1485400 - Part 1: fix tracker found/blocked counter; r=mayhemer
make counter increased when trackers are found

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

--HG--
extra : rebase_source : 90da79fbb83271b2f7a8460ebd02aa2abb635305
extra : source : c476aa79a8ca991dc8ea1e5c2eab98e442dad406
2018-08-31 15:13:30 +00:00
Andrea Marchesini
40a8c122d3 Bug 1487331 - STATE_BLOCKED_TRACKING_COOKIES must tell why cookies are blocked, r=ehsan
Introduce these new blocking state values:

const unsigned long STATE_COOKIES_BLOCKED_BY_PERMISSION = 0x10000000;
const unsigned long STATE_COOKIES_BLOCKED_TRACKER       = 0x20000000;
const unsigned long STATE_COOKIES_BLOCKED_ALL           = 0x40000000;
const unsigned long STATE_COOKIES_BLOCKED_FOREIGN       = 0x80000000;
2018-08-31 11:02:33 +02:00
Coroiu Cristina
437a1f4445 Backed out 2 changesets (bug 1485400) for build bustage at build/src/netwerk/base/nsChannelClassifier.cpp on a CLOSED TREE
Backed out changeset c476aa79a8ca (bug 1485400)
Backed out changeset 9370432b26ad (bug 1485400)
2018-08-31 18:57:58 +03:00
Liang-Heng Chen
64e65f4ec9 Bug 1485400 - Part 1: fix tracker found/blocked counter; r=mayhemer
make counter increased when trackers are found

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

--HG--
extra : moz-landing-system : lando
2018-08-31 15:13:30 +00:00
Andrea Marchesini
45cfa7f75c Bug 1487093 - Propagate cookie blocking notification to child nsIChannel, r=ehsan, r=valentin 2018-08-30 17:44:39 +02:00
Nicholas Nethercote
2fcd08a173 Bug 1486690 - Rename NS_str{,}dup and remove unnecessary checks after calls to them. r=glandium
The 'x' prefix makes it clearer that these are infallible.

A couple of nsJSID methods are now also infallible.

--HG--
extra : rebase_source : fcce44a00212d6d341afbf3827b31bd4f7355ad5
2018-08-28 15:58:54 +10:00
Nicholas Nethercote
ac5efebb4b Bug 1486690 - Remove unnecessary checks after moz_xmalloc() calls. r=glandium
There are surprisingly many of them.

(Plus a couple of unnecessary checks after `new` calls that were nearby.)

--HG--
extra : rebase_source : 47b6d5d7c5c99b1b50b396daf7a3b67abfd74fc1
2018-08-28 15:56:01 +10:00
Jeff Walden
64fceacad0 Bug 1486577 - Don't #include "js/CompilationAndEvaluation.h" in jsapi.h, minimizing the scope of that header and reducing translation-unit size of anything that needs JSAPI but doesn't need to compile/evaluate JavaScript. r=jandem
--HG--
extra : rebase_source : cd9a8becc15477bc5e24408159d4f061ec81c8b2
2018-08-24 22:51:49 -05:00
Andrea Marchesini
c80c929412 Bug 1476967 - Allow the adding of tracking-protection entries via prefs, r=francois 2018-08-27 21:01:14 +02:00
Henri Sivonen
2be0158cae Bug 1485340 - Avoid isdigit() and isxdigit() in URL parsing. r=valentin
MozReview-Commit-ID: 13DUMcZIE19

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

--HG--
extra : moz-landing-system : lando
2018-08-27 09:12:25 +00:00
arthur.iakab
5527acb8d8 Merge inbound to mozilla-central a=merge 2018-08-25 01:08:22 +03:00
David Keeler
1cd81e4c5a bug 1485087 - remove the option to use the TLS session cache from nsITLSServerSocket r=jryans,mayhemer
As initially implemented, nsITLSServerSocket by default enabled the use of the
TLS session cache provided by NSS. However, no consumers of nsITLSServerSocket
actually used it. Because it was an option, though, PSM had to jump through some
hoops to a) make it work in the first place and b) not have NSS panic on
shutdown. Furthermore, it meant increased memory usage for every user of Firefox
(and again, nothing actually used the feature, so this was for naught).

In bug 1479918, we discovered that if PSM shut down before Necko, NSS could
attempt to acquire a lock on the session cache that had been deleted, causing a
shutdown hang. We probably should make it less easy to make this mistake in NSS,
but in the meantime bug 1479918 needs uplifting and this workaround is the
safest, most straight-forward way to achieve this.

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

--HG--
extra : moz-landing-system : lando
2018-08-24 16:00:34 +00:00
Noemi Erli
d9cb8a1d4a Backed out changeset b24238e8e714 (bug 1481199) for failures in mobile/android/tests/browser/chrome/test_device_search_engine.html 2018-08-24 20:34:36 +03:00
Ehsan Akhgari
9172f9d616 Bug 1485494 - Remove the XPCOM registration for RedirectChannelRegistrar; r=mayhemer 2018-08-24 13:04:10 -04:00
Diego Pino Garcia
1f9d6d9b78 Bug 1481199 - Drop the obsolete dataType parameter for nsIBrowserSearchService.addEngine. r=mkaply 2018-08-23 17:25:12 -05:00
Kris Maglione
2dee0aae3c Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj
This allows JS callers to automatically get the correct types during
interation, without having to explicitly specify them.

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

--HG--
extra : rebase_source : b708f382d8ea571d199c669bfed5b5a7ca9ffac4
extra : histedit_source : 7df6feb82088c8a5ca45dc28fe4d2b852c177fee
2018-08-18 21:06:32 -07:00
Dorel Luca
8e7a61886b Backed out changeset d47a2f5db828 (bug 1481199) browser/base/content/test/urlbar/browser_autocomplete_a11y_label.js. CLOSED TREE 2018-08-23 23:45:02 +03:00
Diego Pino Garcia
6900fb42ab Bug 1481199 - Drop the obsolete dataType parameter for nsIBrowserSearchService.addEngine. r=mkaply 2018-08-23 09:00:00 -04:00
Polly Shaw
06de5fed24 Bug 1482224 Crash in Shutdown due to ProxyAutoConfig still aiming to resolve addressThis crash has arisen due to a loop in ProxyAutoConfig which spins until apending PAC request is complete, even when the ProxyAutoConfig object is beingshut... r=valentin
...down. The remedy to prevent the crash is to exit the loop when the
mShutdown flag is set. This does not attempt to address the underlying cause
of why the request continues to be pending, although this is also a concern.
Files changed:
netwerk/base/ProxyAutoConfig.cpp - expanded lambda containing logic of when
to stop waiting for the request to complete to include a check to the mShutdown
flag. Also logged a warning if the loop is exited because of mShutdown.

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

--HG--
extra : moz-landing-system : lando
2018-08-22 23:23:08 +00:00
Ehsan Akhgari
3788f265e3 Bug 1485182 - Part 1: Run http-on-modify-request observers when tracking protection cancels an HTTP channel; r=mayhemer 2018-08-22 14:00:01 -04:00
Ehsan Akhgari
b1a6405b4c Bug 1484876 - Part 3: Refactor the code responsible for checking whether the top window URI is on the content blocking allow list into AntiTrackingCommon; r=francois 2018-08-22 12:02:43 -04:00
Ehsan Akhgari
7a3e0c65f0 Bug 1484876 - Part 2: Check the trackingprotection-pb permission in the channel classifier code instead of accessing nsIPrivateBrowsingTrackingProtectionWhitelist; r=francois 2018-08-22 12:02:43 -04:00
Dylan Roeh
ee984e1e49 Bug 1478171 - [1.0] Forward channel redirect to nsILoadURIDelegate to allow external handling. r=smaug,snorp 2018-08-21 12:52:39 -05:00
Cosmin Sabou
ed624fa8d0 Backed out 6 changesets (bug 1484876) for eslint failure on PrivateBrowsingUtils. CLOSED TREE
Backed out changeset e80737d6af55 (bug 1484876)
Backed out changeset b1cb63d8c8bb (bug 1484876)
Backed out changeset cd2ced689895 (bug 1484876)
Backed out changeset d31e39a47704 (bug 1484876)
Backed out changeset babf6abc7f4c (bug 1484876)
Backed out changeset 1c9895ab06c6 (bug 1484876)
2018-08-22 16:26:33 +03:00
Ehsan Akhgari
c4e0a11824 Bug 1484876 - Part 3: Refactor the code responsible for checking whether the top window URI is on the content blocking allow list into AntiTrackingCommon; r=francois 2018-08-22 09:08:10 -04:00
Ehsan Akhgari
57a5790ea9 Bug 1484876 - Part 2: Check the trackingprotection-pb permission in the channel classifier code instead of accessing nsIPrivateBrowsingTrackingProtectionWhitelist; r=francois 2018-08-22 09:08:10 -04:00
Tiberius Oros
05b46cf200 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-22 00:59:19 +03:00
Honza Bambas
0a40274f51 Bug 1469117 - Make sure we reset network socket timeout epoch to 0 when timeout on a socket is turned off r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D3880

--HG--
extra : moz-landing-system : lando
2018-08-21 14:33:52 +00:00
Henri Sivonen
57d5f3ee13 Bug 1484984 - Avoid writing past the logical length of a string in networking code. r=valentin
MozReview-Commit-ID: IIffoxnF6KS

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

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

MozReview-Commit-ID: 1Ept6kDrjN3

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

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

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

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

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

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

Depends on D3722

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

--HG--
extra : moz-landing-system : lando
2018-08-20 23:53:45 +00:00
Alphan Chen
4b85350209 Bug 1469348 - Fix the problem of download file failed on Mac. r=paolo
In this bug, we will focus on the problem of cannot download PDF file from google drawing successfully on MAC.

After investigating, I found that "SetTarget()" is called twice with two different addresses.
However, they both point to the same file.
We will assign the first target to "mInitialTarget" and the second one to "mRenamedTarget".

This problem happened when doing the second "SetTarget()".
After canceling the existing AsyncCopy, we will schedule a new AsyncCopy.
However, we only assign the mActualTarget with mRenamedTarget when they point to different files.
In this case, the two different addresses point to the same file.
So the mActualTarget is still the same as mInitialTarget.

After completion of the AsyncCopy, we try to do "CheckCompletion".
But it will always return false due to "mRenamedTarget exists" and "mActualTarget" is not the same as "mRenamedTarget".

The solution is quite easy.
We should always update mActualTarget with renameTarget, even if they point to the same file.

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

--HG--
extra : moz-landing-system : lando
2018-08-17 16:40:02 +00:00
Valentin Gosu
20d09475cd Bug 1483445 - Change string from tracking protection to content blocking r=dragana!
Differential Revision: https://phabricator.services.mozilla.com/D3440

--HG--
extra : moz-landing-system : lando
2018-08-20 08:43:08 +00:00
Liang-Heng Chen
39358a724e Bug 1481252 - Part 2: Report Tracking Protection status to docshell; r=valentin,francois
Differential Revision: https://phabricator.services.mozilla.com/D3025

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

--HG--
extra : moz-landing-system : lando
2018-08-16 15:29:22 +00:00
Ehsan Akhgari
33ea2d0935 Bug 1480923 - Part 2: Remove the checks for the restrict3rdpartystorage pref from the channel classifier and only rely on the annotate_channels pref; r=francois 2018-08-15 12:54:58 -04:00
Ehsan Akhgari
8cbcaae11f Bug 1480923 - Part 1: Remove the centralized third-party checks from nsChannelClassifier::ShouldEnableTrackingProtectionInternal in annotation-only mode; r=francois 2018-08-15 12:54:57 -04:00
Brian Hackett
60fcac25d8 Bug 1481353 - Record refcount changes on a couple of stream classes, r=froydnj.
--HG--
extra : rebase_source : b78292b5ddba0397c8289cca9262d5dd27491029
2018-08-14 00:42:19 +00:00
Daniel Varga
9355025fd5 Merge mozilla-central to mozilla-inbound 2018-08-14 01:09:48 +03:00
Andrea Marchesini
d1e5833a37 Bug 1480780 - Merge the privacy.3rdpartystorage.enabled pref with the network.cookie.cookieBehavior pref; r=ehsan
This patch introduces a new cookie behavior policy called
BEHAVIOR_REJECT_TRACKER.  It also makes it possible to override that
behavior with cookie permissions similar to other cookie behaviors.
2018-08-13 16:01:16 -04:00
Adrian Wielgosik
be0c1a4f55 Bug 1481645 - Remove some redundant uses of do_QueryInterface. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D2893

--HG--
extra : moz-landing-system : lando
2018-08-13 09:05:19 +00:00
Andrea Marchesini
04fcbb6556 Bug 1480131 - AntiTrackingCommon::IsFirstPartyStorageAccessGrantFor() should not grant permission to sub-sub-iframe channels; r=ehsan 2018-08-10 14:59:33 -04:00
Jan de Mooij
729eb9343a Bug 1480678 part 10 - Remove unnecessary realm entering in TCPSocket::Send. r=bz 2018-08-09 10:48:29 +02:00
Jean-Yves Avenard
35a7076534 Bug 1481176 - P1. Export GetParameterHTTP as static method. r=valentin,r=bzbarsky
nsContentTypeParser used internally a nsIMIMEHeaderParam reference, effectively limiting its use on the main thread, and as such restricting any methods handling mime type there too.

nsContentTypeParser only made use of a single method nsMIMEHeaderParamImpl::GetParameterHTTP, so we make that method static and export it via nsNetUtil.

Differential Revision: https://phabricator.services.mozilla.com/D2788
2018-08-07 19:21:58 +02:00
Masatoshi Kimura
3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Andrea Marchesini
d7df3bf81e Bug 1476715 - low priority connection for 3rd party + tracking resource only, r=francois 2018-08-06 13:42:43 +02:00
Jeremy Lempereur
e8a7f0b917 Bug 1481016 - Network, use inherent rust methods instead of deprecated std::ascii:AsciiExt ones, r=valentin
MozReview-Commit-ID: F1NGG0q6WdS

--HG--
extra : rebase_source : 077684b197d23f9893048c977f1d3ca2e97b5136
2018-08-04 20:24:59 +02:00
Jan de Mooij
3af36d3d86 Bug 1479363 part 10 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in other directories. r=mrbkap 2018-08-02 19:30:17 +02:00