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

16493 Коммитов

Автор SHA1 Сообщение Дата
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
Dorel Luca d9bdf77969 Merge mozilla-central to autoland 2018-08-21 12:57:58 +03:00
Dorel Luca 07c6e76122 Merge mozilla-inbound to mozilla-central. a=merge 2018-08-21 12:54:24 +03: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
Kris Maglione 356dd0de4a Bug 1484466: Part 3a - Update remaining XPCOMUtils.generateQI callers to use ChromeUtils. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3709

--HG--
extra : rebase_source : 650545d3e58ab92821a9ea2097793cca5996d5b3
2018-08-18 12:44:57 -07:00
Brindusan Cristian edd591c4d4 Backed out changeset 89117b6b5799 (bug 1470853) for xpcshell failures on dom/push/test/xpcshell/test_notification_http2.js. CLOSED TREE 2018-08-20 19:20:20 +03:00
Daniel Stenberg 70b6a3456b bug 1470853 - Add Telemetry::DNS_TRR_REQUEST_PER_CONN r=nwgh
Count number of requests/streams per connection done when the connection
was used for TRR.

MozReview-Commit-ID: H7X06h8gVZY

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

--HG--
extra : moz-landing-system : lando
2018-08-20 15:11:14 +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
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
Francois Marier 5d431dbce9 Bug 1482950 - Fix eslint errors in the tracking annotations test. r=dimi!
Depends on D3721

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

--HG--
extra : moz-landing-system : lando
2018-08-20 08:29:27 +00:00
Francois Marier bc102b000b Bug 1482950 - Improve tracking annotation test. r=Ehsan!
A new parameter is introduced to makeConnection in order to specify
the topWindowURI. This will be useful in future tests, but it also
highlights the fact that we do set this in all of the existing
tests.

Finally, I also added a number of comments and explicit parameter
setting in order to make the test more readily understandable.

Depends on D3720

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

--HG--
extra : moz-landing-system : lando
2018-08-20 14:08:15 +00:00
Francois Marier e2c011dd88 Bug 1482950 - Backed out changeset 32d94a3cc7af. r=xeonchen!
This refactoring is now unnecessary since the third-party check
is getting removed.

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

--HG--
extra : moz-landing-system : lando
2018-08-19 09:00:44 +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
Liang-Heng Chen a0692d51f7 Bug 1482117 - Part 2: cache the result of IsThirdPartyChannel; r=mayhemer
cache the result to speed up

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

--HG--
extra : moz-landing-system : lando
2018-08-17 12:43:51 +00:00
Liang-Heng Chen 837bec1102 Bug 1482117 - Part 1: Make FastBlock happen after tailing; r=mayhemer
move the FastBlock checking block to |TriggerNetwork|

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

--HG--
extra : moz-landing-system : lando
2018-08-15 16:32:34 +00:00
Margareta Eliza Balazs 48299c8cd6 Merge inbound to mozilla-central. a=merge 2018-08-16 12:24:26 +03:00
Junior Hsu 13e7f90bb3 Bug 1280629 - Part 2: telemetry of e10 back pressure suspension rate r=dragana
Split this patch for data review

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

--HG--
extra : moz-landing-system : lando
2018-08-15 22:36:42 +00:00
Junior Hsu 4cd0359acf Bug 1280629 - Part 1: Suspend the http channel if the child process is not able to consume on time r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D2745

--HG--
extra : moz-landing-system : lando
2018-08-15 22:35:58 +00:00
Diego Pino Garcia 6895fb936e Bug 1405022 - Remove unnecessary use of nsAutoCString from the call to NS_NewURI in nsViewSourceChannel::BuildViewSourceURI. r=mayhemer 2018-08-15 09:02:00 -04: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
Narcis Beleuzu 2c112fd0ac Backed out 2 changesets (bug 1280629) for wpt failures on media-elements/video_008.htm
Backed out changeset 64648fd6ef5e (bug 1280629)
Backed out changeset e654f2b128f6 (bug 1280629)
2018-08-15 19:44:37 +03:00
Junior Hsu b434505847 Bug 1280629 - Part 2: telemetry of e10 back pressure suspension rate. r=dragana
Summary: Split this patch for data review

Reviewers: dragana

Reviewed By: dragana

Subscribers: janerik

Bug #: 1280629

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

--HG--
extra : amend_source : 16f0ab9d1f12f7e299d1339e3c1ca3023ea8502b
2018-08-15 10:07:04 +03:00
Junior Hsu c45d80770b Bug 1280629 - Part 1: Suspend the http channel if the child process is not able to consume on time. r=dragana
Reviewers: dragana

Reviewed By: dragana

Subscribers: reviewbot

Bug #: 1280629

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

--HG--
extra : rebase_source : d031d3dcd945e1e479a121c06e5ee0b7dfd75ea9
extra : amend_source : 36f5d5dfb1b6bc29920a8e72f1105def472607fa
2018-08-15 10:04:50 +03: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
Henri Sivonen 3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Ehsan Akhgari c64a283779 Bug 1482999 - Use the final channel URI for top-level document loads when determining the unique cache storage space identifier; r=valentin
In some cases, such as for channels which have been opened from the parent
process, the top window URI isn't available.  For such channels, the code
before this change would fail to compute the top window origin.
2018-08-13 18:22:13 -04:00
Daniel Varga 9355025fd5 Merge mozilla-central to mozilla-inbound 2018-08-14 01:09:48 +03:00
Francois Marier 66260f4d22 Bug 1480448 - Honor browser.contentblocking.enabled in Fastblock. r=xeonchen!
Differential Revision: https://phabricator.services.mozilla.com/D3135

--HG--
extra : moz-landing-system : lando
2018-08-13 10:06:37 +00:00
Ehsan Akhgari 9ab3b9fea9 Bug 1478539 - Part 3: Remove some dead code; r=nwgh 2018-08-13 17:05:31 -04:00
Ehsan Akhgari 8f79c3cc07 Bug 1478539 - Part 1: Add the Cookie header to HTTP requests only after a potential classification has been completed on the channel to ensure the tracking state is up to date; r=nwgh
Besides this, we also need to do two extra things here:

  * Call the http-on-modify-request observers after the Cookie header is set,
    to ensure the Cookie header will be visible to them.
  * Move the call to SetLoadGroupUserAgentOverride() to happen after that, in
    order to preserve the existing respective ordering of that with regards to
    when the http-on-modify-request observers run.

Please note that as things are right now, the http-on-modify-request observers
are unable to see the User-Agent header overrides through the loadgroup, which
seems suboptimal, but this patch aims to preserve the existing behavior of
these observers.
2018-08-13 17:04:44 -04: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
Daniel Stenberg 315e5ddcc0 bug 1466462 - TRR: disable EDNS Client Subnet by default r=mcmanus
Set the "network.trr.disable-ECS" pref to false to disable.

MozReview-Commit-ID: GE6L8Vpvuu0

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

--HG--
extra : moz-landing-system : lando
2018-08-13 15:45:15 +00: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
Gabriele Svelto 15adf94f4d Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant C++ functions are updated to take a typed enum. JavaScript
calls are unaffected but they will throw if the string argument does not
correspond to one of the known entries in the C++ enum. The existing whitelists
and blacklists of annotations are also generated from the YAML file and all
duplicate code related to them has been consolidated. Once written out to the
.extra file the annotations are converted in string form and are no different
than the existing ones.

All existing annotations have been included in the list (and some obsolete ones
have been removed) and all call sites have been updated including tests where
appropriate.

--HG--
extra : source : 4f6c43f2830701ec5552e08e3f1b06fe6d045860
2018-07-05 15:42:11 +02:00
Noemi Erli be6ab34c54 Merge mozilla-central to inbound. a=merge CLOSED TREE
--HG--
extra : rebase_source : 691b5b30b6c3b2ddece605c045ad913e466fdbab
2018-08-10 00:35:58 +03:00
Noemi Erli de9e45a850 Merge inbound to mozilla-central. a=merge 2018-08-10 00:31:09 +03:00
Tiberius Oros fae00acf70 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-09 13:06:13 +03: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
Csoregi Natalia 0ed25650ef Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-08 13:02:49 +03:00