Cherry pick "Cache pending JS bridge sync IPC replies, and send in case of RenderFrame deletion."
Cache pending JS bridge sync IPC replies, and send in case of
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.
5 files changed