Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Issue 120913004: aura: Ensure OwnedMailbox not used with invalid or destroyed GLHelper. (Closed)

Created:
6 years, 11 months ago by danakj
Modified:
6 years, 11 months ago
Reviewers:
piman
CC:
chromium-reviews, joi+watch-content_chromium.org, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, jam, penghuang+watch_chromium.org, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, James Su, miu+watch_chromium.org
Visibility:
Public.

Description

aura: 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+226 lines, -23 lines) Patch
M cc/test/test_context_support.cc View 1 2 3 4 5 3 chunks +8 lines, -2 lines 0 comments Download
M content/browser/aura/owned_mailbox.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/aura/owned_mailbox.cc View 1 2 3 3 chunks +9 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 3 4 5 6 chunks +11 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 12 chunks +49 lines, -13 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 3 4 5 6 7 10 chunks +147 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
danakj
6 years, 11 months ago (2014-01-07 19:52:23 UTC) #1
danakj
My other thought here was to add a OnShutdown() method to the ImageTransportFactoryObserver class, and ...
6 years, 11 months ago (2014-01-07 19:53:44 UTC) #2
danakj
Hm, there's a failure I need to look at it seems, will come back to ...
6 years, 11 months ago (2014-01-08 00:46:12 UTC) #3
danakj
PTAL
6 years, 11 months ago (2014-01-08 18:21:26 UTC) #4
piman
LGTM. Is there a way to unit test the RWHVA changes?
6 years, 11 months ago (2014-01-08 21:53:04 UTC) #5
danakj
On Wed, Jan 8, 2014 at 4:53 PM, <piman@chromium.org> wrote: > LGTM. Is there a ...
6 years, 11 months ago (2014-01-08 22:03:56 UTC) #6
danakj
Please have a look at the test
6 years, 11 months ago (2014-01-09 00:07:07 UTC) #7
piman
LGTM, thanks! https://codereview.chromium.org/120913004/diff/420001/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc File content/browser/renderer_host/render_widget_host_view_aura_unittest.cc (right): https://codereview.chromium.org/120913004/diff/420001/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc#newcode1332 content/browser/renderer_host/render_widget_host_view_aura_unittest.cc:1332: // LOG(ERROR)<<"Running"; nit: remove.
6 years, 11 months ago (2014-01-09 00:23:28 UTC) #8
danakj
https://codereview.chromium.org/120913004/diff/420001/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc File content/browser/renderer_host/render_widget_host_view_aura_unittest.cc (right): https://codereview.chromium.org/120913004/diff/420001/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc#newcode1332 content/browser/renderer_host/render_widget_host_view_aura_unittest.cc:1332: // LOG(ERROR)<<"Running"; On 2014/01/09 00:23:29, piman wrote: > nit: ...
6 years, 11 months ago (2014-01-09 00:34:55 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/120913004/600001
6 years, 11 months ago (2014-01-09 00:42:06 UTC) #10
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) app_list_unittests, aura_unittests, browser_tests, compositor_unittests, content_browsertests, content_unittests, ...
6 years, 11 months ago (2014-01-09 02:10:19 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/120913004/910001
6 years, 11 months ago (2014-01-09 18:40:23 UTC) #12
commit-bot: I haz the power
6 years, 11 months ago (2014-01-09 21:05:13 UTC) #13
Message was sent while issue was closed.
Change committed as 243971

Powered by Google App Engine
This is Rietveld 408576698