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

Issue 193303002: WeakPtr destruction order cleanup: media edition. (Closed)

Created:
6 years, 9 months ago by DaleCurtis
Modified:
6 years, 9 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, pwestin+watch_google.com, mikhal+watch_chromium.org, fischman+watch_chromium.org, jasonroberts+watch_google.com, jam, mcasas+watch_chromium.org, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, hguihot+watch_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, hubbe+watch_chromium.org, miu+watch_chromium.org
Visibility:
Public.

Description

WeakPtr destruction order cleanup: media edition. Per WeakPtrFactory documentation it must be the first member variable destructed to avoid invalid member variable access during destruction. Additional cleanups: - Removes "weak_this_" usage when there is no manual factory invalidation. - Adds DISALLOW_COPY_AND_ASSIGN to SendProcess. - Removes unused WeakPtr from FFmpegVideoDecoder, VpxVideoDecoder, FFMpegAudioDecoder, OpusAudioDecoder BUG=351048 TEST=compiles, passes CQ. R=fischman@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257765

Patch Set 1 #

Total comments: 25

Patch Set 2 : Comments. #

Patch Set 3 : Rebase. Fix OSX. #

Patch Set 4 : Rebase. Remove unused. #

Patch Set 5 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+416 lines, -343 lines) Patch
M content/browser/media/android/browser_media_player_manager.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/media/android/media_resource_getter_impl.h View 1 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/media/android/media_resource_getter_impl.cc View 1 3 chunks +10 lines, -8 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/android/media_source_delegate.h View 1 2 chunks +9 lines, -9 lines 0 comments Download
M content/renderer/media/android/media_source_delegate.cc View 1 2 chunks +7 lines, -7 lines 0 comments Download
M content/renderer/media/android/webmediaplayer_android.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/buffered_data_source.h View 1 2 chunks +1 line, -2 lines 0 comments Download
M content/renderer/media/buffered_data_source.cc View 1 6 chunks +24 lines, -16 lines 0 comments Download
M content/renderer/media/cdm_session_adapter.h View 1 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/media/crypto/ppapi_decryptor.h View 1 2 chunks +1 line, -2 lines 0 comments Download
M content/renderer/media/crypto/ppapi_decryptor.cc View 1 12 chunks +65 lines, -40 lines 0 comments Download
M content/renderer/media/crypto/proxy_decryptor.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M content/renderer/media/crypto/proxy_decryptor.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M content/renderer/media/rtc_video_decoder.h View 1 2 chunks +2 lines, -5 lines 0 comments Download
M content/renderer/media/rtc_video_decoder.cc View 1 2 6 chunks +13 lines, -10 lines 0 comments Download
M content/renderer/media/rtc_video_encoder.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/rtc_video_encoder.cc View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M content/renderer/media/video_capture_impl.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/video_capture_impl.cc View 1 5 chunks +5 lines, -5 lines 0 comments Download
M content/renderer/media/video_capture_impl_manager.h View 1 1 chunk +5 lines, -2 lines 0 comments Download
M content/renderer/media/webaudiosourceprovider_impl.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M content/renderer/media/webaudiosourceprovider_impl.cc View 1 2 chunks +5 lines, -7 lines 0 comments Download
M media/audio/alsa/alsa_input.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M media/audio/alsa/alsa_input.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M media/audio/alsa/alsa_output.h View 1 2 chunks +5 lines, -4 lines 0 comments Download
M media/audio/alsa/alsa_output.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M media/base/android/media_decoder_job.h View 1 2 chunks +5 lines, -4 lines 0 comments Download
M media/base/android/media_decoder_job.cc View 1 2 3 4 2 chunks +6 lines, -4 lines 0 comments Download
M media/base/android/media_player_bridge.h View 1 2 chunks +7 lines, -5 lines 0 comments Download
M media/base/android/media_player_bridge.cc View 7 chunks +24 lines, -15 lines 0 comments Download
M media/base/android/media_source_player.h View 1 2 3 chunks +6 lines, -4 lines 0 comments Download
M media/base/android/media_source_player.cc View 1 2 7 chunks +22 lines, -15 lines 0 comments Download
M media/base/serial_runner.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M media/base/serial_runner.cc View 2 chunks +13 lines, -9 lines 0 comments Download
M media/base/text_renderer.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M media/base/text_renderer.cc View 1 4 chunks +8 lines, -9 lines 0 comments Download
M media/base/user_input_monitor_linux.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M media/base/user_input_monitor_win.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M media/cast/audio_receiver/audio_receiver.h View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M media/cast/audio_sender/audio_encoder.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M media/cast/audio_sender/audio_sender.h View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M media/cast/audio_sender/audio_sender.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M media/cast/cast_sender_impl.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M media/cast/test/sender.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M media/cast/test/utility/in_process_receiver.h View 1 1 chunk +1 line, -1 line 0 comments Download
M media/cast/transport/pacing/paced_sender.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M media/cast/transport/rtp_sender/rtp_sender.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M media/cast/transport/transport/udp_transport.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M media/cast/video_receiver/video_receiver.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M media/cast/video_sender/external_video_encoder.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M media/cast/video_sender/video_sender.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M media/filters/audio_renderer_impl.h View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M media/filters/audio_renderer_impl.cc View 1 2 3 8 chunks +11 lines, -11 lines 0 comments Download
M media/filters/decoder_selector.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M media/filters/decoder_stream.h View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M media/filters/decoder_stream.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M media/filters/decrypting_audio_decoder.h View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M media/filters/decrypting_audio_decoder.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M media/filters/decrypting_demuxer_stream.h View 1 2 chunks +4 lines, -2 lines 0 comments Download
M media/filters/decrypting_demuxer_stream.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M media/filters/decrypting_video_decoder.h View 1 2 chunks +4 lines, -2 lines 0 comments Download
M media/filters/decrypting_video_decoder.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M media/filters/fake_video_decoder.h View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M media/filters/fake_video_decoder.cc View 1 2 3 3 chunks +7 lines, -6 lines 0 comments Download
M media/filters/ffmpeg_audio_decoder.h View 1 2 3 2 chunks +0 lines, -3 lines 0 comments Download
M media/filters/ffmpeg_audio_decoder.cc View 1 2 3 4 chunks +0 lines, -6 lines 0 comments Download
M media/filters/ffmpeg_demuxer.h View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 1 2 3 4 8 chunks +17 lines, -11 lines 0 comments Download
M media/filters/ffmpeg_video_decoder.h View 1 2 3 2 chunks +0 lines, -3 lines 0 comments Download
M media/filters/ffmpeg_video_decoder.cc View 1 2 3 2 chunks +1 line, -5 lines 0 comments Download
M media/filters/gpu_video_decoder.h View 1 2 chunks +4 lines, -4 lines 0 comments Download
M media/filters/gpu_video_decoder.cc View 1 2 3 4 chunks +7 lines, -7 lines 0 comments Download
M media/filters/opus_audio_decoder.h View 1 2 3 2 chunks +0 lines, -3 lines 0 comments Download
M media/filters/opus_audio_decoder.cc View 1 2 3 4 chunks +1 line, -9 lines 0 comments Download
M media/filters/video_renderer_impl.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M media/filters/video_renderer_impl.cc View 1 8 chunks +14 lines, -13 lines 0 comments Download
M media/filters/vpx_video_decoder.h View 1 2 3 2 chunks +0 lines, -3 lines 0 comments Download
M media/filters/vpx_video_decoder.cc View 1 2 3 2 chunks +1 line, -5 lines 0 comments Download
M media/midi/usb_midi_device_factory_android.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M media/video/capture/mac/video_capture_device_mac.h View 1 2 3 4 1 chunk +5 lines, -5 lines 0 comments Download
M media/video/capture/mac/video_capture_device_mac.mm View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
DaleCurtis
6 years, 9 months ago (2014-03-10 21:49:01 UTC) #1
Ami GONE FROM CHROMIUM
most/all of the "ditto" comments might be trivially resolvable by dropping the WeakPtr member in ...
6 years, 9 months ago (2014-03-10 22:02:07 UTC) #2
DaleCurtis
My worry about changing all the weak_this_ into GetWeakPtr() isn't performance, but rather that weak_this_ ...
6 years, 9 months ago (2014-03-10 22:10:00 UTC) #3
Ami GONE FROM CHROMIUM
On Mon, Mar 10, 2014 at 3:10 PM, <dalecurtis@chromium.org> wrote: > My worry about changing ...
6 years, 9 months ago (2014-03-10 22:15:16 UTC) #4
DaleCurtis
https://codereview.chromium.org/193303002/diff/1/media/cast/audio_receiver/audio_receiver.h File media/cast/audio_receiver/audio_receiver.h (right): https://codereview.chromium.org/193303002/diff/1/media/cast/audio_receiver/audio_receiver.h#newcode142 media/cast/audio_receiver/audio_receiver.h:142: // variables might be accessed. On 2014/03/10 22:02:08, Ami ...
6 years, 9 months ago (2014-03-10 22:22:39 UTC) #5
Ami GONE FROM CHROMIUM
I am not strongly opposed but I predict you will come to RUE this comment ...
6 years, 9 months ago (2014-03-10 22:29:04 UTC) #6
DaleCurtis
Macro seems obtuse, however I did shorten the message to a one-liner for the sake ...
6 years, 9 months ago (2014-03-10 23:47:45 UTC) #7
Ami GONE FROM CHROMIUM
LGTM
6 years, 9 months ago (2014-03-12 18:57:42 UTC) #8
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 9 months ago (2014-03-17 16:06:37 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/193303002/20001
6 years, 9 months ago (2014-03-17 16:07:23 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-17 16:35:41 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on mac_chromium_compile_dbg tryserver.chromium on mac_chromium_rel
6 years, 9 months ago (2014-03-17 16:35:41 UTC) #12
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 9 months ago (2014-03-17 17:37:51 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/193303002/40001
6 years, 9 months ago (2014-03-17 17:38:35 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-17 19:00:38 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_rel
6 years, 9 months ago (2014-03-17 19:00:38 UTC) #16
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 9 months ago (2014-03-17 20:37:41 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/193303002/40001
6 years, 9 months ago (2014-03-17 20:38:18 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 12:29:29 UTC) #19
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 9 months ago (2014-03-18 17:09:20 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/193303002/80001
6 years, 9 months ago (2014-03-18 17:12:29 UTC) #22
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 19:26:56 UTC) #23
commit-bot: I haz the power
Commit queue rejected this change because the description was changed between the time the change ...
6 years, 9 months ago (2014-03-18 19:26:58 UTC) #24
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 9 months ago (2014-03-18 19:36:52 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/193303002/80001
6 years, 9 months ago (2014-03-18 19:39:54 UTC) #26
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 21:26:07 UTC) #27
commit-bot: I haz the power
Failed to apply patch for media/video/capture/mac/video_capture_device_mac.mm: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-03-18 21:26:08 UTC) #28
DaleCurtis
6 years, 9 months ago (2014-03-18 21:36:30 UTC) #29
Message was sent while issue was closed.
Committed patchset #5 manually as r257765 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698