• benm's avatar
    Cache pending JS bridge sync IPC replies, and send in case of RenderFrame deletion. · 48334b78
    benm authored
    When the WebView app makes a call to java over the JavaScriptBridge,
    we leave the renderer hanging on a synchronous IPC. Once control
    is passed into Java, it's possible that the WebView may get destroyed
    (and thus the IPC channel back to the renderer closed) which means we
    can't unblock the renderer waiting on the IPC response.
    
    Instead we cache the IPC reply message and while waiting on Java to come
    back to us, if we detect that the RenderFrame has been deleted, send a
    reponse back before the IPC channel is closed.
    
    BUG=408188
    
    Review URL: https://codereview.chromium.org/498633003
    
    Cr-Commit-Position: refs/heads/master@{#292631}
    48334b78
gin_java_bridge_errors.cc 1.17 KB