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

Issue 1477013005: Replace RefCountImpl with rtc::RefCountedObject. (Closed)

Created:
5 years ago by pbos-webrtc
Modified:
4 years, 9 months ago
CC:
webrtc-reviews_webrtc.org, video-team_agora.io, yujie_mao (webrtc), zhuangzesen_agora.io, henrika_webrtc, zhengzhonghou_agora.io, fengyue_agora.io, stefan-webrtc, tterriberry_mozilla.com, audio-team_agora.io, sdk-team_agora.io, peah-webrtc, the sun, andresp, perkj_webrtc, mflodman, wangrui
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Replace RefCountImpl with rtc::RefCountedObject. Removes code duplication and use of the dangerous public destructor in RefCountImpl. Also making wider use of scoped_refptr and fixing various leaks in the process. BUG=webrtc:5229 R=tommi@webrtc.org Committed: https://crrev.com/1d1944187fe1304b5933bc8f8a8a36a54da3e705 Cr-Commit-Position: refs/heads/master@{#12075}

Patch Set 1 #

Patch Set 2 : include header typo #

Patch Set 3 : scoped_refptr everywhere #

Patch Set 4 : fix compile errors on win/ios #

Patch Set 5 : remove vcm reference in Destroy #

Patch Set 6 : rebase #

Total comments: 8

Patch Set 7 : feedback #

Patch Set 8 : scoped_refptr in AudioTransportAPITest #

Patch Set 9 : rebase #

Total comments: 7

Patch Set 10 : remove bogus release() calls #

Total comments: 2

Patch Set 11 : add back explicit Release()s in test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -260 lines) Patch
M webrtc/modules/audio_device/audio_device_impl.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M webrtc/modules/audio_device/audio_device_impl.cc View 1 2 3 4 5 6 7 8 3 chunks +10 lines, -19 lines 0 comments Download
M webrtc/modules/audio_device/include/audio_device.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M webrtc/modules/audio_device/test/audio_device_test_api.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +13 lines, -21 lines 0 comments Download
M webrtc/modules/desktop_capture/differ_block_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/modules/rtp_rtcp/source/forward_error_correction.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/video_capture/external/video_capture_external.cc View 1 2 1 chunk +3 lines, -5 lines 0 comments Download
M webrtc/modules/video_capture/ios/video_capture_ios.h View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M webrtc/modules/video_capture/ios/video_capture_ios.mm View 1 2 3 3 chunks +13 lines, -10 lines 0 comments Download
M webrtc/modules/video_capture/linux/device_info_linux.cc View 2 chunks +1 line, -9 lines 0 comments Download
M webrtc/modules/video_capture/linux/video_capture_linux.cc View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -15 lines 0 comments Download
M webrtc/modules/video_capture/mac/video_capture_mac.mm View 1 2 5 chunks +15 lines, -34 lines 0 comments Download
M webrtc/modules/video_capture/video_capture_factory.h View 1 2 1 chunk +6 lines, -4 lines 0 comments Download
M webrtc/modules/video_capture/video_capture_factory.cc View 1 2 2 chunks +5 lines, -4 lines 0 comments Download
M webrtc/modules/video_capture/video_capture_impl.h View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -4 lines 0 comments Download
M webrtc/modules/video_capture/video_capture_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -13 lines 0 comments Download
M webrtc/modules/video_capture/windows/device_info_ds.cc View 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/modules/video_capture/windows/video_capture_factory_windows.cc View 1 2 3 2 chunks +10 lines, -8 lines 0 comments Download
M webrtc/system_wrappers/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
D webrtc/system_wrappers/include/ref_count.h View 1 chunk +0 lines, -82 lines 0 comments Download
M webrtc/system_wrappers/system_wrappers.gyp View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/test/vcm_capturer.h View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M webrtc/test/vcm_capturer.cc View 1 2 3 4 1 chunk +3 lines, -7 lines 0 comments Download
M webrtc/video/video_capture_input_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M webrtc/video/video_send_stream_tests.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/voice_engine/shared_data.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -3 lines 0 comments Download
M webrtc/voice_engine/shared_data.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -8 lines 0 comments Download

Messages

Total messages: 66 (24 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1477013005/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1477013005/1
5 years ago (2015-11-27 13:07:11 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios32_sim_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/ios32_sim_dbg/builds/3608) mac_x64_gn_dbg on ...
5 years ago (2015-11-27 13:09:12 UTC) #4
pbos-webrtc
include header typo
5 years ago (2015-11-27 13:11:02 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1477013005/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1477013005/20001
5 years ago (2015-11-27 13:11:27 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_asan on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_asan/builds/10925)
5 years ago (2015-11-27 13:39:04 UTC) #9
pbos-webrtc
scoped_refptr everywhere
5 years ago (2015-11-27 17:57:48 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1477013005/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1477013005/60001
5 years ago (2015-11-27 18:00:06 UTC) #14
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios64_sim_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/ios64_sim_dbg/builds/3611) ios_arm64_dbg on ...
5 years ago (2015-11-27 18:03:00 UTC) #16
pbos-webrtc
fix compile errors on win/ios
5 years ago (2015-11-27 18:04:24 UTC) #17
pbos-webrtc
On 2015/11/27 18:04:24, pbos-webrtc wrote: > fix compile errors on win/ios PTAL, this reduces code ...
5 years ago (2015-11-27 18:11:55 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1477013005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1477013005/80001
5 years ago (2015-11-27 18:12:26 UTC) #20
pbos-webrtc
remove vcm reference in Destroy
5 years ago (2015-11-27 18:46:42 UTC) #21
pbos-webrtc
rebase
4 years, 11 months ago (2016-01-07 16:19:50 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1477013005/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1477013005/120001
4 years, 11 months ago (2016-01-07 16:21:46 UTC) #24
pbos-webrtc
PTAL
4 years, 11 months ago (2016-01-07 16:21:48 UTC) #25
tommi
https://codereview.webrtc.org/1477013005/diff/120001/webrtc/modules/audio_device/test/audio_device_test_api.cc File webrtc/modules/audio_device/test/audio_device_test_api.cc (right): https://codereview.webrtc.org/1477013005/diff/120001/webrtc/modules/audio_device/test/audio_device_test_api.cc#newcode49 webrtc/modules/audio_device/test/audio_device_test_api.cc:49: AudioEventObserverAPI(rtc::scoped_refptr<AudioDeviceModule> audioDevice) const& otherwise we're adding calls to AddRef/Release ...
4 years, 11 months ago (2016-01-07 16:41:40 UTC) #26
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_baremetal on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/win_baremetal/builds/8227)
4 years, 11 months ago (2016-01-07 17:02:33 UTC) #28
pbos-webrtc
feedback
4 years, 11 months ago (2016-01-07 17:08:37 UTC) #29
pbos-webrtc
scoped_refptr in AudioTransportAPITest
4 years, 11 months ago (2016-01-07 17:23:01 UTC) #30
pbos-webrtc
PTAL https://codereview.webrtc.org/1477013005/diff/120001/webrtc/modules/audio_device/test/audio_device_test_api.cc File webrtc/modules/audio_device/test/audio_device_test_api.cc (right): https://codereview.webrtc.org/1477013005/diff/120001/webrtc/modules/audio_device/test/audio_device_test_api.cc#newcode49 webrtc/modules/audio_device/test/audio_device_test_api.cc:49: AudioEventObserverAPI(rtc::scoped_refptr<AudioDeviceModule> audioDevice) On 2016/01/07 16:41:40, tommi-webrtc wrote: > ...
4 years, 11 months ago (2016-01-07 17:23:16 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1477013005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1477013005/160001
4 years, 11 months ago (2016-01-07 17:23:30 UTC) #33
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_baremetal on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_baremetal/builds/8255)
4 years, 11 months ago (2016-01-07 20:29:08 UTC) #35
pbos-webrtc
Tommi do you think we wanna land something like this? This probably fails rebase by ...
4 years, 9 months ago (2016-03-16 11:14:33 UTC) #36
tommi (sloooow) - chröme
yes - have you given rebase a try?
4 years, 9 months ago (2016-03-16 16:00:38 UTC) #38
pbos-webrtc
rebase
4 years, 9 months ago (2016-03-16 20:34:34 UTC) #39
pbos-webrtc
rebase seemed doable, that's surprising PTAL
4 years, 9 months ago (2016-03-16 20:37:49 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1477013005/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1477013005/180001
4 years, 9 months ago (2016-03-16 20:38:07 UTC) #42
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-16 22:37:59 UTC) #44
tommi
https://codereview.webrtc.org/1477013005/diff/180001/webrtc/modules/audio_device/test/audio_device_test_api.cc File webrtc/modules/audio_device/test/audio_device_test_api.cc (right): https://codereview.webrtc.org/1477013005/diff/180001/webrtc/modules/audio_device/test/audio_device_test_api.cc#newcode164 webrtc/modules/audio_device/test/audio_device_test_api.cc:164: audio_device_.release(); ehm, yeah you'd think that .release() calls Release(), ...
4 years, 9 months ago (2016-03-17 09:15:12 UTC) #45
pbos-webrtc
PTAL https://codereview.webrtc.org/1477013005/diff/180001/webrtc/modules/audio_device/test/audio_device_test_api.cc File webrtc/modules/audio_device/test/audio_device_test_api.cc (right): https://codereview.webrtc.org/1477013005/diff/180001/webrtc/modules/audio_device/test/audio_device_test_api.cc#newcode164 webrtc/modules/audio_device/test/audio_device_test_api.cc:164: audio_device_.release(); On 2016/03/17 09:15:12, tommi-webrtc wrote: > ehm, ...
4 years, 9 months ago (2016-03-17 15:04:00 UTC) #46
pbos-webrtc
remove bogus release() calls
4 years, 9 months ago (2016-03-17 15:04:17 UTC) #47
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1477013005/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1477013005/200001
4 years, 9 months ago (2016-03-17 15:05:43 UTC) #49
tommi
https://codereview.webrtc.org/1477013005/diff/180001/webrtc/test/vcm_capturer.cc File webrtc/test/vcm_capturer.cc (left): https://codereview.webrtc.org/1477013005/diff/180001/webrtc/test/vcm_capturer.cc#oldcode90 webrtc/test/vcm_capturer.cc:90: // TODO(pbos): How do I destroy the VideoCaptureModule? This ...
4 years, 9 months ago (2016-03-17 15:10:57 UTC) #50
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_TIMED_OUT, no build URL) ...
4 years, 9 months ago (2016-03-17 17:06:12 UTC) #52
pbos-webrtc
add back Release()s in test
4 years, 9 months ago (2016-03-21 10:04:11 UTC) #53
pbos-webrtc
PTAL again, went with Release() to check it. https://codereview.webrtc.org/1477013005/diff/180001/webrtc/test/vcm_capturer.cc File webrtc/test/vcm_capturer.cc (left): https://codereview.webrtc.org/1477013005/diff/180001/webrtc/test/vcm_capturer.cc#oldcode90 webrtc/test/vcm_capturer.cc:90: // ...
4 years, 9 months ago (2016-03-21 10:04:31 UTC) #54
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1477013005/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1477013005/220001
4 years, 9 months ago (2016-03-21 10:42:59 UTC) #57
tommi
lgtm https://codereview.webrtc.org/1477013005/diff/180001/webrtc/test/vcm_capturer.cc File webrtc/test/vcm_capturer.cc (left): https://codereview.webrtc.org/1477013005/diff/180001/webrtc/test/vcm_capturer.cc#oldcode90 webrtc/test/vcm_capturer.cc:90: // TODO(pbos): How do I destroy the VideoCaptureModule? ...
4 years, 9 months ago (2016-03-21 11:23:21 UTC) #58
pbos-webrtc
On 2016/03/21 11:23:21, tommi-webrtc wrote: > lgtm > > https://codereview.webrtc.org/1477013005/diff/180001/webrtc/test/vcm_capturer.cc > File webrtc/test/vcm_capturer.cc (left): > ...
4 years, 9 months ago (2016-03-21 11:55:32 UTC) #59
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-21 12:53:14 UTC) #62
pbos-webrtc
Committed patchset #11 (id:220001) manually as 1d1944187fe1304b5933bc8f8a8a36a54da3e705 (presubmit successful).
4 years, 9 months ago (2016-03-21 15:44:50 UTC) #65
commit-bot: I haz the power
4 years, 9 months ago (2016-03-21 15:44:52 UTC) #66
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/1d1944187fe1304b5933bc8f8a8a36a54da3e705
Cr-Commit-Position: refs/heads/master@{#12075}

Powered by Google App Engine
This is Rietveld 408576698