Descriptionaura: Ensure OwnedMailbox not used with invalid or destroyed GLHelper.
There are 2 scenarios when the GLHelper becomes invalid:
1. On lost context. In this case, the OwnedMailbox is reset and the
pointer is destroyed. However, the copy request result code would
continue trying to use the OwnedMailbox regardless. Instead we can
use this as a hint that the mailbox is no longer valid and abort the
readback.
2. On shutdown. Once the RenderWidgetHostViewAura is shutdown, there
is no way to easily tell if the GLHelper attached to the OwnedMailbox
being stored in copy request callbacks is still alive. Since a readback
on the RenderWidgetHostViewAura can not complete once the RWHVA class
is destroyed anyways, we can destroy the contents of the OwnedMailboxes
in flight at that time. This way when the readback is later aborted,
the OwnedMailbox does not try to clean itself up with a potentially
destroyed GLHelper.
R=piman@chromium.org
BUG=270918
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243971
Patch Set 1 : ownedmailbox: #Patch Set 2 : ownedmailbox: #Patch Set 3 : ownedmailbox: #Patch Set 4 : ownedmailbox: dontaddnullownedmailbox #Patch Set 5 : ownedmailbox: setnotdeque #Patch Set 6 : ownedmailbox: test #
Total comments: 2
Patch Set 7 : ownedmailbox: nits #Patch Set 8 : ownedmailbox: expectfalse #
Messages
Total messages: 13 (0 generated)
|