summaryrefslogtreecommitdiffstats
path: root/content/common/gpu/gpu_command_buffer_stub.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/common/gpu/gpu_command_buffer_stub.cc')
-rw-r--r--content/common/gpu/gpu_command_buffer_stub.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index ceecbe4..9ebb287d 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -358,7 +358,7 @@ void GpuCommandBufferStub::Destroy() {
have_context = decoder_->MakeCurrent();
FOR_EACH_OBSERVER(DestructionObserver,
destruction_observers_,
- OnWillDestroyStub(this));
+ OnWillDestroyStub());
scoped_refptr<gfx::GLContext> context;
if (decoder_) {
@@ -759,8 +759,9 @@ void GpuCommandBufferStub::OnCreateVideoDecoder(
int decoder_route_id = channel_->GenerateRouteID();
GpuVideoDecodeAccelerator* decoder =
new GpuVideoDecodeAccelerator(decoder_route_id, this);
- video_decoders_.push_back(decoder);
decoder->Initialize(profile, reply_message);
+ // decoder is registered as a DestructionObserver of this stub and will
+ // self-delete during destruction of this stub.
}
void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) {