Open Bug 1231738 Opened 9 years ago Updated 2 years ago

Gather and store details of blocked loads for the current page

Categories

(Firefox :: General, defect, P4)

defect

Tracking

()

Tracking Status
firefox45 --- affected

People

(Reporter: Paolo, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxprivacy])

      No description provided.
We may have to update the Tracking Protection back-end in order to get a list of blocked loads. Here is a possible approach that Francois suggested:

> With the blockedTrackingNodes property I can access the list of DOM nodes
> that triggered blocking, however I suppose that to know the actual
> blocked URLs I still have to guess which of the attributes to consider
> based on node type (and there may be more than one). Is there a way to
> get just the list of blocked URLs?

We could change the code that builds the list of blocked nodes:

https://dxr.mozilla.org/mozilla-central/rev/e02b17a2b5b8df7bb84f325fc08eedd2f3cab755/docshell/base/nsDocShell.cpp#7544
https://dxr.mozilla.org/mozilla-central/rev/e02b17a2b5b8df7bb84f325fc08eedd2f3cab755/dom/base/nsImageLoadingContent.cpp#185
https://dxr.mozilla.org/mozilla-central/rev/e02b17a2b5b8df7bb84f325fc08eedd2f3cab755/dom/base/nsObjectLoadingContent.cpp#1152
https://dxr.mozilla.org/mozilla-central/rev/e02b17a2b5b8df7bb84f325fc08eedd2f3cab755/dom/base/nsScriptLoader.cpp#1454
https://dxr.mozilla.org/mozilla-central/rev/e02b17a2b5b8df7bb84f325fc08eedd2f3cab755/layout/style/Loader.cpp#831

to make this easier and pass along the request URI, but then we're still
going to miss trackers loaded via XHR or Fetch since these aren't elements.

> Also, do you know which event I should listen to in order to detect when
> this list changes?

It doesn't look like we fire anything specific to trackers, but maybe
you could add an event here:

https://dxr.mozilla.org/mozilla-central/rev/e02b17a2b5b8df7bb84f325fc08eedd2f3cab755/dom/base/nsIDocument.h#2605-2616

Otherwise, they're just failed loads (similar to network errors) and we
update the security UI (i.e. shield) here:

https://dxr.mozilla.org/mozilla-central/rev/e02b17a2b5b8df7bb84f325fc08eedd2f3cab755/netwerk/base/nsChannelClassifier.cpp#471

so that could potentially be another place to hook into.
Priority: -- → P4
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.