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

Issue 10831169: Delay GpuCommandBufferStub::AddDestructionObserver until we need it. (Closed)

Created:
8 years, 4 months ago by piman
Modified:
8 years, 4 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, apatrick_chromium
Visibility:
Public.

Description

Delay GpuCommandBufferStub::AddDestructionObserver until we need it. In certain failure cases at initialization time (caused by a race) we used to call AddDestructionObserver before we would make the surface current, causing us to destroy the surface before OnWillDestroyStub had a chance to be called, so we wouldn't RemoveDestructionObserver and we'd call into a dead pointer. This fixes it. By the time MakeCurrent is called, we know we have a ref to the surface and it won't destroy it until GpuCommandBufferStub::Destroy, after OnWillDestroyStub is called. BUG=140502 TEST=attach debugger to renderer, add a breakpoint to CommandBufferProxyImpl::Initialize, right-click and "view page source" (breakpoint should hit), kill new tab, and only then continue breakpoint. Observe no GPU process crash. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=150227

Patch Set 1 #

Patch Set 2 : fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -2 lines) Patch
M content/common/gpu/image_transport_surface.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/common/gpu/texture_image_transport_surface.cc View 1 3 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
piman
backer@ would be the most familiar person to review this, unfortunately he's out for a ...
8 years, 4 months ago (2012-08-06 21:59:57 UTC) #1
piman
->gman instead 'cause Al is out as well
8 years, 4 months ago (2012-08-07 00:06:19 UTC) #2
greggman
um, lgtm Though you're right. I probably don't have enough context to review this well. ...
8 years, 4 months ago (2012-08-07 00:15:00 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/piman@chromium.org/10831169/5001
8 years, 4 months ago (2012-08-07 00:19:50 UTC) #4
piman
On Mon, Aug 6, 2012 at 5:15 PM, <gman@chromium.org> wrote: > um, lgtm > > ...
8 years, 4 months ago (2012-08-07 00:20:08 UTC) #5
commit-bot: I haz the power
Change committed as 150227
8 years, 4 months ago (2012-08-07 01:40:34 UTC) #6
apatrick_chromium
8 years, 4 months ago (2012-08-09 18:47:26 UTC) #7
lgtm

Powered by Google App Engine
This is Rietveld 408576698