Not tagging images loaded by ad scripts |
||
Issue descriptionImages are loaded in a microtask after the script runs. Therefore, the ad script isn't in the stack when probe::WillSendRequest is received in the AdTracker. We'll need to check the stack earlier on. The stack when we do receive the image looks like this: #0 0x7faacc218c2c base::debug::StackTrace::StackTrace() #1 0x7faac6f1f194 blink::AdTracker::WillSendRequest() #2 0x7faac76b87ae blink::probe::willSendRequestImpl() #3 0x7faac7518704 blink::FrameFetchContext::DispatchWillSendRequest() #4 0x7faac5883596 blink::ResourceFetcher::StartLoad() #5 0x7faac588203a blink::ResourceFetcher::RequestResource() #6 0x7faac7547fd1 blink::ImageResource::Fetch() #7 0x7faac754bea9 blink::ImageResourceContent::Fetch() #8 0x7faac752900c blink::ImageLoader::DoUpdateFromElement() #9 0x7faac752b23a blink::ImageLoader::Task::Run() How to reproduce: Make a test like AdTrackerSimTest.ResourceLoadedWhileExecutingAdScript but load an image instead of a script from the ad script.
,
Jun 4 2018
Note that AdTrackerSimTest.ResourceLoadedWhileExecutingAdScript (mentioned in the original comment) is in CL: https://crrev.com/c/1071729
,
Jun 11 2018
,
Jun 14 2018
There's been mention that this issue may be resolved with the completion of the Async Stack Adtracker (see https://bugs.chromium.org/p/chromium/issues/detail?id=851531). Right now, I've adapted the mentioned test and it fails as expected when an image instead of a script is loaded.
,
Aug 2
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fd0a8309e4a39ddcd2598a617d99488cbb0e7998 commit fd0a8309e4a39ddcd2598a617d99488cbb0e7998 Author: Eric Robinson <ericrobinson@chromium.org> Date: Thu Aug 02 15:26:26 2018 AdTracker tests of resource marking for images, frames. This CL adds tests to the AdTracker to verify that resources loaded by an ad script are marked properly ad ads during loaded. This does not work properly for images currently due to crbug.com/848916. Bug: 848916, 863446 Change-Id: I6643ec24c16ec7dceb9c60fd150046b86cb008ac Reviewed-on: https://chromium-review.googlesource.com/1140196 Reviewed-by: Josh Karlin <jkarlin@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Eric Robinson <ericrobinson@chromium.org> Cr-Commit-Position: refs/heads/master@{#580192} [modify] https://crrev.com/fd0a8309e4a39ddcd2598a617d99488cbb0e7998/third_party/blink/renderer/core/frame/ad_tracker_test.cc |
||
►
Sign in to add a comment |
||
Comment 1 by jkarlin@chromium.org
, Jun 4 2018