• Albert Chaulk's avatar
    Fix crash with NavigationThrottles · becd697b
    Albert Chaulk authored
    There is a crash in ProcessNavigationDecision, accessing an almost null
    pointer. From disassembly inspection this is likely accessing the vtable
    which means the Throttle got destroyed
    
    Likely code path
    - start navigation
    - send throttle decision request
    - navigation cancelled for some reason, throttle destroyed
    - reply arrives
    
    There was no code path to handle nulling the throttle if it got destroyed.
    This CL adds this path and a second one to prevent a future
    webview dtor -> throttle dtor crash
    
    Bug: b/148126060
    Test: None, can't repro crash
    Change-Id: I4cb4d5720c114c97d49bae95f0768da0d8c025b1
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2023048Reviewed-by: default avatarDaniel Nicoara <dnicoara@chromium.org>
    Commit-Queue: Albert Chaulk <achaulk@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#736039}
    becd697b
webview_navigation_throttle.h 1.42 KB