Use weak pointers for callbacks passed to media::VideoDecoder from VideoDecoderShim
commitbeb207a3fce9e99299473840bff5a67f3623c1de
authorsergeyu <sergeyu@chromium.org>
Sat, 30 May 2015 00:04:07 +0000 (29 17:04 -0700)
committerCommit bot <commit-bot@chromium.org>
Sat, 30 May 2015 00:05:04 +0000 (30 00:05 +0000)
tree055701a795199f65c23bf95c3616dae85d173fed
parent6e09311524a2987f95e0b4d39cd497b955b3a0c7
Use weak pointers for callbacks passed to media::VideoDecoder from VideoDecoderShim

media::VideoDecoder implementations often use base::BindToCurrentLoop()
for callbacks. This means that callbacks passed to VideoDecoder may be
called after the decoder is destroyed. VideoDecoderShim wasn't
handling that case. Fixed it to use weak pointers for the callbacks
it passes VideoDecoder.

BUG=491363

Review URL: https://codereview.chromium.org/1159553009

Cr-Commit-Position: refs/heads/master@{#332084}
content/renderer/pepper/video_decoder_shim.cc