Delay SwapOut ACK to fix postMessages sent from subframe unload handlers.
After r550769, cross-process postMessages are scheduled with PostTask, so that the actual postMessage IPC goes out on next iteration of the event loop. This is problematic when postMessage is executed from an unload handler that is triggered on a local-to-remote frame swap in RenderFrameImpl::OnSwapOut: the SwapOut ACK ends up being sent before any postMessage IPCs, and if this was the last active frame in the process, the browser process, upon receiving the SwapOut ACK, might destroy proxies that a postMessage was targeting. To prevent this, schedule the SwapOut ACK to ensure that it gets sent after any postMessage IPCs. Bug: 857274 Change-Id: I9e7339c0abc409fd201e7f73927e871c0f0d3b95 Reviewed-on: https://chromium-review.googlesource.com/1119391Reviewed-by:Charlie Reis <creis@chromium.org> Commit-Queue: Alex Moshchuk <alexmos@chromium.org> Cr-Commit-Position: refs/heads/master@{#571625}
Showing
Please register or sign in to comment