fcaeb2bbb99f4ef72791079d0b6d868d2bbdcc69
- new args at InterceptNavigationDelegate.ShouldIgnoreNavigation: should_run_async, result_callback; - return type changed from bool to void Related Chromium change: https://source.chromium.org/chromium/chromium/src/+/8c2b10e85ff860959aaf6bf86f48bd03fc998ccb Reland "Fix Async Navigation Intercept using the wrong URL for fast redirects" Original change's description: Fix Async Navigation Intercept using the wrong URL for fast redirects Prior to this change, if we received a redirect before the async shouldIgnoreNavigation call was run (which does happen in practice) we would still run the pending shouldIgnoreNavigation call but the NavigationHandle would already be updated to the redirect URL and so the result would potentially be wrong. It's also complicted to reason about multiple checks in flight at once. This change ensures that before processing the redirect, we finish processing the previous step in the navigation (either the initial navigation or a previous redirect). Also, I moved the async task to Java to make use of the cached ExternalNavigationParams as the NavigationHandle is mutable and could be modified between when the task is posted and when it's run. We'll still get the vast majority of the benefit from the async path as it's extremely rare that we get a redirect before finishing the check, so this should be performance neutral. No new Kill Switch is needed for this change, as we can re-use the kAsyncCheck Kill Switch to disable async nav altogether if we really need to. Bug: 381535042 Change-Id: I674aca65a4f2e5ca31670cf52929e8f87daf0528 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6194176
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
Brave Core
Brave Core is a set of changes, APIs, and scripts used for customizing Chromium to make the Brave browser. Please also check https://github.com/brave/brave-browser
Follow @brave on Twitter for important announcements.
Resources
Community
You can ask questions and interact with the community in the following locations:
- Brave Community
communitychannel on Brave Software's Slack
Languages
C++
36.9%
HTML
31.6%
Swift
9.4%
TypeScript
9%
Java
4.8%
Other
8.1%