DescriptionDelay 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 #
Messages
Total messages: 7 (0 generated)
|