"Force ad blocking on this site" devtools setting can sometimes lose state |
|||||
Issue descriptionIt appears our browser-process side code tracking this can sometimes detect that the button is unchecked (or the devtools window is closed) when it isn't. Without doing any debugging, my gut is that it's PageHandler going out of scope: https://cs.chromium.org/chromium/src/chrome/browser/devtools/protocol/page_handler.cc?rcl=4de65ba04a18745d4963ca386a3e3f2b1735135a&l=17
,
Feb 16 2018
Adding devtools component. +pfeldman: when exactly do Page Enable/Disable events come in from devtools?
,
Feb 16 2018
I was able to repro this on usatoday after reloading a few times. It appears my guess in the description is correct, and we're getting a notification that the ChromeDevToolsManagerDelegate::ClientDetached, even though the devtools window is still open. The ClientDetached looks like it's coming from a child frame being removed. Maybe we need to only look at main frames? Not sure.
,
Feb 23 2018
Pavel: can someone on the devtools team lend a hand here? This unreliability makes the "block ads" checkbox very unpredictable.
,
Feb 27 2018
I've debugged this down to site isolation, because usatoday hosts a cross-process subframe. My guess is that we create a new PageHandler for the hosted subframe, so we need to filter those out for ad blocking (which only cares about main frames).
,
Feb 27 2018
,
Mar 1 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c84985897c2695ca31245d44c30e92abcbbefa45 commit c84985897c2695ca31245d44c30e92abcbbefa45 Author: Charles Harrison <csharrison@chromium.org> Date: Thu Mar 01 16:51:57 2018 [subresource_filter] Fix devtools toggle with site isolation Multiple PageHandlers can be created with isolating subframes. This breaks the devtools toggle which expects a single PageHandler for the main frame. This CL adds a bit to the PageHandler which classifies whether it is for the main frame. If it is not, then it cannot change the filtering toggle. Bug: 813197 Change-Id: I7698985822f5ee159399bd1d37884436c5278d0b Reviewed-on: https://chromium-review.googlesource.com/939602 Reviewed-by: Pavel Feldman <pfeldman@chromium.org> Commit-Queue: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#540185} [modify] https://crrev.com/c84985897c2695ca31245d44c30e92abcbbefa45/chrome/browser/devtools/chrome_devtools_session.cc [modify] https://crrev.com/c84985897c2695ca31245d44c30e92abcbbefa45/third_party/WebKit/Source/devtools/front_end/inspector_main/InspectorMain.js
,
Mar 1 2018
,
Mar 7 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/11d9d45132c92f31beadb7f57a3028dc7cbf85cf commit 11d9d45132c92f31beadb7f57a3028dc7cbf85cf Author: Charles Harrison <csharrison@chromium.org> Date: Wed Mar 07 17:47:25 2018 Add test for r540185 (Fix ad block devtools toggle with site isolation) Bug: 813197 Change-Id: I2cc1f37e67911bbcfacbb0235c7330b51c5146c1 Reviewed-on: https://chromium-review.googlesource.com/943741 Reviewed-by: Pavel Feldman <pfeldman@chromium.org> Commit-Queue: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#541491} [modify] https://crrev.com/11d9d45132c92f31beadb7f57a3028dc7cbf85cf/chrome/browser/subresource_filter/subresource_filter_devtools_browsertest.cc
,
Mar 7 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by csharrison@chromium.org
, Feb 16 2018