Closed Bug 1599046 Opened 5 years ago Closed 4 years ago

Moving the ContentBlockingLog to the parent process

Categories

(Core :: Privacy: Anti-Tracking, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: dlee, Assigned: dlee)

References

Details

Attachments

(4 files, 1 obsolete file)

Right now, the ContentBlockingLog is located on the document of the top-level window. This is incompatible to the Fission since the top-level window might not be accessible if it is cross-origin.
In order to make this work in the Fission. We'll remove ContentBlockingLog from the child process and store it in the parent process instead.

Priority: -- → P1
Assignee: nobody → dlee
Status: NEW → ASSIGNED
Depends on: 1600878
Depends on: 1600896
Depends on: 1601310
Depends on: 1601660
Depends on: 1603053

At this point, there is no consumer that uses ContentBlockingLog stored
in the child. This patch removes the following code:

  1. Removing nsGlobalWindowOuter::NotifyContentBlockingEvent
  2. Removing nsDocLoader::OnContentBlockingEvent
  3. Removing contentBlockingEvent in nsISecureBrowserUI.idl
  4. Removing mContentBlockingLog from Document.cpp and APIs related to it.

As the final step, all the callsites of NotifyOnContentBlocking should
be removed.

Depends on D56874

Blocks: 1603392

This patch does the followings:

  1. Remove NotifyOnContentBlocking in WindowOuter and all the call sites.
    This is because all the content blocking event handling is moved to the parent.

  2. Replace UrlClassifierCommon::NotifyChannelBlocked with AntiTrackingCommon:::NotifyContentBlockingEventInParent.
    This is because we don't need to pass the request to the child anymore, which was implemented in NotifyChannelBlocked previously.

  3. Add NotifyContentBlockingEvent* utility functions to AntiTrackingCommon.cpp.

  4. Update AntiTrackingCommon::NotifyBlockingDecision, when it is called in the parent,
    do not send requests to the child, notify the parent directly

Attachment #9116691 - Attachment is obsolete: true

The following methods are removed:

  1. notifyChannelClassifierProtectionDisabled
  2. notifyCookieAllowed
  3. notifyCookieBlocked

Can these changes land now?

(In reply to :ehsan akhgari from comment #7)

Can these changes land now?

Yes, Bug 1601660 was landed two days ago, we can land this one now :)

Blocks: 1611755
Pushed by dlee@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/805fb67be8a3
P1. Remove ContentBlockingLog from the child r=timhuang,Ehsan
https://hg.mozilla.org/integration/autoland/rev/2bc0fa3bbe0e
P2. Remove calling NotifyOnContentBlocking in the child process r=timhuang,Ehsan
https://hg.mozilla.org/integration/autoland/rev/2e165c119a4f
P3. Remove unused IPC method in nsIParentChannel.idl. r=timhuang,Ehsan
https://hg.mozilla.org/integration/autoland/rev/721f54870498
P4. Report content blocking log to console while running in the parent process r=Ehsan
Pushed by dlee@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/db8e34b8d16c
P1. Remove ContentBlockingLog from the child r=timhuang,Ehsan
https://hg.mozilla.org/integration/autoland/rev/cb08405e4cbc
P2. Remove calling NotifyOnContentBlocking in the child process r=timhuang,Ehsan
https://hg.mozilla.org/integration/autoland/rev/4feab5c36c60
P3. Remove unused IPC method in nsIParentChannel.idl. r=timhuang,Ehsan
https://hg.mozilla.org/integration/autoland/rev/dcc985749140
P4. Report content blocking log to console while running in the parent process r=Ehsan
Flags: needinfo?(dlee)

== Change summary for alert #24812 (as of Tue, 28 Jan 2020 20:33:25 GMT) ==

Improvements:

6% raptor-tp6-instagram-firefox-cold loadtime windows10-64-shippable opt 1,419.83 -> 1,330.50

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=24812

Blocks: 1590696
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: