• Robert Ogden's avatar
    Fix IsolatedPrerender crash · 08eb43ca
    Robert Ogden authored
    This crash is caused by the callback being run after the original SRP
    has been navigated away from, causing the metrics collector to be null.
    
    This CL adds a check to skip the callback if the url isn't in the set
    of predicted urls, and also adds an additional guard to check that the
    metrics collector is not null.
    
    Bug: 1141319,1136174
    Change-Id: Ia8a8542cf5c6833abdd1e88d5c2317966ebf4cb7
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2490211
    Auto-Submit: Robert Ogden <robertogden@chromium.org>
    Commit-Queue: Ryan Sturm <ryansturm@chromium.org>
    Reviewed-by: default avatarRyan Sturm <ryansturm@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#819865}
    08eb43ca
isolated_prerender_tab_helper.cc 51 KB