We should make sure Ad Click Attribution redirects to well-known location don't trigger a conversion if they are blocked by content blockers.
<rdar://problem/47763188>
Created attachment 367996 [details] Patch
Comment on attachment 367996 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367996&action=review > Source/WebKit/ChangeLog:12 > + a blocked request comes back empty. It makes sense to be consistent there with content blockers but more generally with the whole loading code. Web Process might cancel the load due to injected bundles, CSP, the context going away... The easiest approach might be to do the handleAdClickAttributionConversion call in NetworkResourceLoader::continueWillSendRequest if the request is not null. That means keeping an Optional<AdClickAttribution::Conversion> as a member field of NetworkResourceLoader and populate it in NetworkResourceLoader::willSendRedirectedRequest.
Comment on attachment 367996 [details] Patch I think this is consistent with the rest of the loading code.
Comment on attachment 367996 [details] Patch Thanks, both of you! Let’s revisit this when we move content blockers to the network process.
Comment on attachment 367996 [details] Patch Clearing flags on attachment: 367996 Committed r244544: <https://trac.webkit.org/changeset/244544>
All reviewed patches have been landed. Closing bug.
> I think this is consistent with the rest of the loading code. Not really. Even though NetworkProcess is more and more independent of WebProcess, this is still not the case. Given network load checker can be null in some cases, given injected bundles, the most consistent place to do the whole conversion is in NetworkResourceLoader::continueWillSendRequest. There may not even be the need to add a NetworkResourceLoader field since originalRequest is kept.