Wait for WebContentsDestroyed before returning on tabs.remove Extensions API
If a page has beforeunload/unload handlers (and soon, pagehide and visibilitychange handlers too), tabs.remove might not be able to close a tab immediately. We shouldn't trigger the callback passed to tabs.remove until the tabs actually closed. This CL waits for WebContentsDestroyed to be called on all the tabs that we're removing before responding/triggering callbacks. Bug: 987409 Change-Id: Ibdf526307c8c2652bc04a7aca4c379aca6d11922 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2319927 Commit-Queue: Rakina Zata Amni <rakina@chromium.org> Reviewed-by:Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/master@{#794852}
Showing
Please register or sign in to comment