Commit graph

140 commits

Author SHA1 Message Date
Christoph Kerschbaumer
54df1cb98c Bug 1528677: Remove nullchecks for loadinfo since we have loadinfo on all channels. r=baku 2019-02-20 13:27:25 +01:00
Ehsan Akhgari
324a8a3f31 Bug 1526542 follow-up: Address froydnj's review comment by adding the length of aGrantedOrigin to the capacity consideration of aPermissionKey as well 2019-02-12 10:02:38 -05:00
Ehsan Akhgari
f32cd1cf0a Bug 1526542 - Improve the efficiency of CreatePermissionKey(); r=baku
There are two changes being made here:

  * In call sites where we know both origin arguments are equal,
    we will call a specialized version of the function which
    avoids the origin equality check.
  * We avoid calling into the generic printf structure and build
    the result string manually.

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

--HG--
extra : moz-landing-system : lando
2019-02-11 12:55:52 +00:00
Ehsan Akhgari
a5caf078e9 Bug 1525502 - Part 2: Add an MRU cache for CheckContentBlockingAllowList(); r=baku
Depends on D18779

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

--HG--
extra : moz-landing-system : lando
2019-02-07 15:21:58 +00:00
Ehsan Akhgari
ceeeb81583 Bug 1525502 - Part 1: Add an API for registering a callback to get called when something changes in the environment which can change the result of anti-tracking checks; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D18779

--HG--
extra : moz-landing-system : lando
2019-02-07 15:21:56 +00:00
Ehsan Akhgari
4d532aee2e Bug 1525208 - Part 7: Devirtualize accesses to nsPermissionManager in the anti-tracking backend; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D18649
2019-02-05 18:49:36 -05:00
Andrea Marchesini
e9ac7d9ef2 Bug 1522210 - Fingerprinting and cryptomining classifiers must have separate nsIWebProgressListener blocking state codes - part 5 - generalize content blocking notification, r=ehsan
Differential Revision: https://phabricator.services.mozilla.com/D17838
2019-01-28 16:44:38 +01:00
Randell Jesup
76bd9e73cc Bug 1522150: Add a DeferredTimers queue ahead of the normal Idle EventQueue r=froyd
* * *
Bug 1522150: Rename NS_IdleDispatch* functions since they take queue identifiers r=froyd
2019-01-26 12:18:05 -05:00
Ehsan Akhgari
0e87c93f9a Bug 1522370 - Part 2: Remove the changes for bug 1493361 which accidentally crept in here while rebasing 2019-01-25 17:03:23 -05:00
Coroiu Cristina
caf5db8e62 Merge inbound to mozilla-central a=merge 2019-01-25 23:49:49 +02:00
Ehsan Akhgari
de3af6756d Bug 1522490 - Only get the parent principal URI if logging is enabled; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D17502

--HG--
extra : moz-landing-system : lando
2019-01-25 08:50:54 +00:00
Ehsan Akhgari
15e5d573b4 Bug 1522370 - Report anti-tracking warnings to console from the idle event queue; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D17450
2019-01-25 09:41:23 -05:00
Ehsan Akhgari
9efcce8bbb Bug 1509112 - Consider the content frame sitting directly beneath a moz-extension frame that has a host permission granting access to that frame as a top-level frame; r=kmag,baku
Differential Revision: https://phabricator.services.mozilla.com/D14832

--HG--
extra : moz-landing-system : lando
2019-01-23 14:55:49 +00:00
Ehsan Akhgari
4137a92662 Bug 1514340 - Part 2: Break out the content blocking related notifications into nsIWebProgressListener.onContentBlockingEvent(); r=baku,johannh
Differential Revision: https://phabricator.services.mozilla.com/D16052
2019-01-21 09:58:50 -05:00
Ehsan Akhgari
9324c0a183 Bug 1519205 - Reduce the amount of UTF encodings we do when checking content blocking rules; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D16233

--HG--
extra : moz-landing-system : lando
2019-01-14 08:24:41 +00:00
Andrea Marchesini
10799b6b03 Bug 1513300 - Implement Cryptomining URL-Classifier, r=dimi 2019-01-09 12:16:04 +01:00
Andrea Marchesini
0c34bd1c34 Bug 1513298 - Fingerprinting url-classifier feature, r=dimi 2019-01-09 12:16:04 +01:00
Noemi Erli
ac42324894 Backed out changeset 76f3be6b25e1 (bug 1513298) for ES lint failure in test_fingerprinting.html CLOSED TREE 2019-01-09 12:15:44 +02:00
Andrea Marchesini
f10ced4f9d Bug 1513298 - Fingerprinting url-classifier feature, r=dimi 2019-01-08 23:05:41 +01:00
Ehsan Akhgari
4ea67edf08 Bug 1517014 - Part 4: Remove a useless QueryInterface from AntiTrackingCommon::IsOnContentBlockingAllowList(); r=baku
The only implementation of nsIURI which has a GetHostPort() method which can
succeed is nsStandardURL, which implements nsIURL.  Other implementations
either do not implement nsIURL (so in the old version, they would bail out
early) or they do, but their GetHostPort() method returns an error code
unconditionally (so in the old version, they would bail out later).  Hence,
this patch doesn't change the semantics of the code.

Depends on D15545

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

--HG--
extra : moz-landing-system : lando
2019-01-07 18:45:32 +00:00
Ehsan Akhgari
7c77372689 Bug 1517014 - Part 3: Avoid a hashtable lookup in AntiTrackingCommon::IsOnContentBlockingAllowList(); r=baku
Depends on D15544

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

--HG--
extra : moz-landing-system : lando
2019-01-07 18:45:30 +00:00
Ehsan Akhgari
8edc422166 Bug 1517014 - Part 2: Avoid the overhead of parsing our origin string into a URI in AntiTrackingCommon::IsOnContentBlockingAllowList(); r=baku
Depends on D15543

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

--HG--
extra : moz-landing-system : lando
2019-01-07 18:45:28 +00:00
Emilio Cobos Álvarez
d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Peter Van der Beken
a17049feac Bug 1353867 - Change WindowProxy type. r=bzbarsky
Add a WindowProxyHolder type and generate binding code that takes or returns it whenever
the WebIDL refers to the WindowProxy type. This patch just makes the WindowProxyHolder
hold a strong reference to a nsPIDOMWindowOuter.

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

--HG--
extra : moz-landing-system : lando
2019-01-02 13:26:56 +00:00
Ehsan Akhgari
60238893a6 Bug 1517057 - Part 2: Avoid minting a new codebase principal in the channel-based version of AntiTrackingCommon::IsFirstPartyStorageAccessGrantedFor() in the common case to make things faster; r=baku
Depends on D15547

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

--HG--
extra : moz-landing-system : lando
2019-01-02 15:41:59 +00:00
Andrea Marchesini
301d9591cd Bug 1515693 - Check allow-storage-access-by-user-activation sandbox flag only if StorageAccess API is enabled, r=ehsan 2018-12-22 00:38:37 +01:00
Ehsan Akhgari
d5c51c8c6b Bug 1515343 - Emit the correct rejection code from the anti-tracking backend when a dynamic storage check fails with a doubly nested iframe; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D14993

--HG--
extra : moz-landing-system : lando
2018-12-20 13:40:24 +00:00
Ehsan Akhgari
d97e533391 Bug 1515498 - Fix the argument types StorageAccessGrantPromise is resolved with; r=baku
This is a non-functional fix (since int converts to bool implicitly)
which reverts a mistake I made when rebasing the fix in bug 1509047.

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

--HG--
extra : moz-landing-system : lando
2018-12-20 13:40:57 +00:00
Ehsan Akhgari
aeb407a001 Bug 1515165 - Remove the eTLD+1 checks from the anti-tracking backend; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D14886

--HG--
extra : moz-landing-system : lando
2018-12-19 14:52:30 +00:00
Bogdan Tara
91d742d138 Merge inbound to mozilla-central. a=merge 2018-12-19 06:50:57 +02:00
Ehsan Akhgari
c4ecc7c9bd Bug 1515063 - Add error categories for the console errors reported from the anti-tracking backend; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D14862

--HG--
extra : moz-landing-system : lando
2018-12-18 15:21:04 +00:00
Andrea Marchesini
5a54c5d995 Bug 1514796 - Fix an assertion in AntiTrackingCommon about 3rd party checks between window and URLs, r=ehsan 2018-12-18 20:01:35 +01:00
Ehsan Akhgari
4eaf343f6a Bug 1510657 - Ensure that we don't attempt to access a channel's window in the parent process inside AntiTrackingCommon::NotifyBlockingDecision() r=baku
Some channels such as the dummy channel created inside
CookieServiceParent::RecvSetCookieString() do not have an
nsIParentChannel interface, but we must be careful to not run the
content process code path for them.

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

--HG--
extra : moz-landing-system : lando
2018-12-08 19:41:05 +00:00
Ehsan Akhgari
9a096cb89d Bug 1510909 - Bypass calling nsContentUtils::IsThirdPartyWindowOrChannel() for BEHAVIOR_REJECT_TRACKER r=baku
Calling this function is just a waste of time since we will check
third-partiness a few statements further down.

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

--HG--
extra : moz-landing-system : lando
2018-12-04 04:18:19 +00:00
Cosmin Sabou
b5fbf5751e Backed out changeset 481a655f835e (bug 1510909) for assertion failures on AntiTrackingCommon.cpp. CLOSED TREE 2018-11-30 19:03:25 +02:00
Ehsan Akhgari
57ab400bcf Bug 1510909 - Bypass calling nsContentUtils::IsThirdPartyWindowOrChannel() for BEHAVIOR_REJECT_TRACKER r=baku
Calling this function is just a waste of time since we will check
third-partiness a few statements further down.

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

--HG--
extra : moz-landing-system : lando
2018-11-30 11:23:46 +00:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Ehsan Akhgari
66952eb338 Bug 1509047 - Part 3: Add support for automatically granting storage access permissions on a temporary session-based basis on the Gecko side; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D12864
2018-11-29 00:45:06 -05:00
Ehsan Akhgari
486b276941 Bug 1509555 - Part 4: Remove nsIWebProgressListener::STATE_BLOCKED_SLOW_TRACKING_CONTENT r=baku
Depends on D12830

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

--HG--
extra : moz-landing-system : lando
2018-11-27 08:56:39 +00:00
Ehsan Akhgari
4b258c7d53 Bug 1509691 - Ensure that the antitracking backend uses the channel third-party tracking flag r=baku
This makes a difference for doubly nested trackers that are embedded
under the same top-level tracker, with a third-party origin in the
middle, as the test case in this commit has set up things.

The test case here fails without the code changes.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 08:59:09 +00:00
Ehsan Akhgari
697ab66a73 Bug 1509667 - Remove an extremely verbose warning from GetParentPrincipalAndTrackingOrigin() r=baku
It can be expected for the top-level storage area principal to be
null here, so we shouldn't warn about it.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 08:58:11 +00:00
Ehsan Akhgari
cc714b7adc Bug 1490811 - Part 1: Add a permission doorhanger for the storage access API r=baku,johannh
Differential Revision: https://phabricator.services.mozilla.com/D12467

--HG--
extra : moz-landing-system : lando
2018-11-26 21:23:16 +00:00
Andrea Marchesini
5368c7288c Bug 1509132 - Inform the 3rd party tracker window when the storage permission is granted, r=ehsan
This is needed for the LocalStorage Next-Generation project which sends storage
notifications only to content processes with an existing LocalStorage object.

I cannot write a test for this, because the current localStorage all works fine.
2018-11-23 08:12:02 +01:00
Ehsan Akhgari
bd56dca68e Bug 1509340 - Don't dispatch STATE_COOKIES_LOADED notifications from the parent process for fastblock r=baku
Differential Revision: https://phabricator.services.mozilla.com/D12679

--HG--
extra : moz-landing-system : lando
2018-11-22 16:49:39 +00:00
Ehsan Akhgari
5a990aab93 Bug 1504728 - Part 1: Add a content blocking notification for indicating when a top-level page is using cookies or site data r=baku,valentin,johannh
Differential Revision: https://phabricator.services.mozilla.com/D11122

--HG--
extra : moz-landing-system : lando
2018-11-20 14:34:49 +00:00
Boris Zbarsky
9691e7ba88 Bug 1507540 part 3. Use more notxpcom attributes in netwerk/. r=valentin 2018-11-19 20:17:53 -05:00
Andrea Marchesini
256980ac39 Bug 1507769 - User-interaction required before granting storage access for some 3rd party trackers, r=ehsan 2018-11-19 23:56:04 +01:00
Andrea Marchesini
57c95d19dd Bug 1505571 - Store access-storage permissions in the top-level window too, r=ehsan
This is needed for any storage access request, coming synchronously after the
setting of the permission.
2018-11-19 23:56:04 +01:00
Andrea Marchesini
9aeee3b18d Bug 1505571 - Don't chcek user-interaction permission when the operation starts from user-interaction, r=ehsan
The permission has been just set, but the content process haven't received it
back from the parent process.
2018-11-19 23:56:03 +01:00
Ciure Andrei
97ae4101ac Backed out 4 changesets (bug 1507769, bug 1505571) for browser_storageAccessWithHeuristics.js failures CLOSED TREE
Backed out changeset 401763b97e54 (bug 1507769)
Backed out changeset 838dfe679fdd (bug 1505571)
Backed out changeset 88af3329ee16 (bug 1505571)
Backed out changeset be17a8b7aefa (bug 1505571)
2018-11-19 22:06:24 +02:00