-
Notifications
You must be signed in to change notification settings - Fork 971
Tab is destroyed if switched during first attach #13798
Comments
This could be worked around by instead of working out whether we need to detach and attach to another WebContents after Here's what's going on when a tab is setActive, and has it's guestInstanceId passed to a webview's
|
The attach -> detach -> attach is actually caused by our code hiding and showing the |
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
Should be fixed in 0.22.109 |
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore.
…emove other rendering workarounds Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore. Remove all composition workarounds from c65 as they are no longer needed for c66
…emove other rendering workarounds Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore. Remove all composition workarounds from c65 as they are no longer needed for c66
…emove other rendering workarounds Fix #13798 since "display: none" and then "display: ''" of a webview will cause the guest to (asynchronously) detach and attach again, and by that time we had attached another guest, which causes the original tab to be destroyed since we are attaching a guest to a webview which already has a guest. Luckily, it doesn't look like this workaround is needed in order to paint the first attachGuest of a webview anymore. Remove all composition workarounds from c65 as they are no longer needed for c66
This is definitely fixed, since I removed the code that was hiding and showing the webview after C66 (as it was no longer required in order to force the tab to display without just being blank) - since the code is removed, it won't cause the issue. But the STR was to ctrl-tab through tabs very quickly at startup (with a profile that has a few tabs in it), and some of them would be removed. |
First attach of a tab seems to cause the WebContents to attach, then detach, then attach again very quickly. If the active tab is switched during the 'detach' phase, then the WebContents will not be properly detached and will be destroyed when the new Tab is attached. This is because the WebContents does not report as attached, even though it is about to automatically attach again.
@bridiver do you know if muon is to blame for the attach -> detach -> attach initial repeat, or somewhere deep in Chromium? It complicates things when there is no trustworthy event or property for whether it is attached or detached, or even attaching or detaching, since when we receive
did-attach
, we have no way of knowing if the WebContents will emitdid-detach
anddid-attach
very quickly again ...and we do not want to attach another guest to the view if the WebContents is reporting it is not attached but is actually about to attach again (automatically).I encountered this by pinning a tab, and then opening a new window (which at the moment causes active tab to switch very quickly from the new non-pinned tab to the new pinned tab). It usually repeats once within 10 new windows, as it's a timing issue.
The text was updated successfully, but these errors were encountered: