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

Issue 1487493002: Add helper KeepRefUntilDone (Closed)

Created:
5 years ago by perkj_webrtc
Modified:
5 years ago
Reviewers:
magjed_webrtc, tommi
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, zhengzhonghou_agora.io, video-team_agora.io, stefan-webrtc, mflodman
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Add helper KeepRefUntilDone. The callback keeps a reference to an object until the callback goes out of scope. Committed: https://crrev.com/14f4144a82558ec4da2d4962ef02b23f44967b6a Cr-Commit-Position: refs/heads/master@{#10847}

Patch Set 1 #

Total comments: 12

Patch Set 2 : Addressed comments. Now uses RefCountedInterface instead of a template. #

Total comments: 4

Patch Set 3 : Changed back to use template #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -30 lines) Patch
M talk/app/webrtc/java/jni/native_handle_impl.cc View 1 2 chunks +3 lines, -7 lines 0 comments Download
M webrtc/base/callback_unittest.cc View 1 2 3 chunks +59 lines, -0 lines 0 comments Download
A webrtc/base/keep_ref_until_done.h View 1 2 1 chunk +43 lines, -0 lines 0 comments Download
M webrtc/common_video/video_frame_buffer.cc View 1 2 chunks +2 lines, -8 lines 0 comments Download
M webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc View 1 4 chunks +3 lines, -15 lines 0 comments Download

Messages

Total messages: 24 (9 generated)
perkj_webrtc
Please?
5 years ago (2015-11-29 16:51:22 UTC) #2
mflodman
Seen-by-coincidence-drive-by-nit https://codereview.webrtc.org/1487493002/diff/1/webrtc/base/release_when_done_callback.h File webrtc/base/release_when_done_callback.h (right): https://codereview.webrtc.org/1487493002/diff/1/webrtc/base/release_when_done_callback.h#newcode2 webrtc/base/release_when_done_callback.h:2: * Copyright 2004 The WebRTC Project Authors. All ...
5 years ago (2015-11-30 08:45:10 UTC) #3
tommi
https://codereview.webrtc.org/1487493002/diff/1/webrtc/base/callback_unittest.cc File webrtc/base/callback_unittest.cc (right): https://codereview.webrtc.org/1487493002/diff/1/webrtc/base/callback_unittest.cc#newcode119 webrtc/base/callback_unittest.cc:119: cb2 = cb; add EXPECT_EQ(2, t.RefCount()); ? https://codereview.webrtc.org/1487493002/diff/1/webrtc/base/release_when_done_callback.h File ...
5 years ago (2015-11-30 08:45:51 UTC) #4
magjed_webrtc
Update this place as well: webrtc/common_video/video_frame_buffer.cc: static void NoLongerUsedCallback(rtc::scoped_refptr<VideoFrameBuffer> dummy) https://codereview.webrtc.org/1487493002/diff/1/webrtc/base/release_when_done_callback.h File webrtc/base/release_when_done_callback.h (right): https://codereview.webrtc.org/1487493002/diff/1/webrtc/base/release_when_done_callback.h#newcode22 ...
5 years ago (2015-11-30 09:22:18 UTC) #5
perkj_webrtc
Please? https://codereview.webrtc.org/1487493002/diff/1/webrtc/base/callback_unittest.cc File webrtc/base/callback_unittest.cc (right): https://codereview.webrtc.org/1487493002/diff/1/webrtc/base/callback_unittest.cc#newcode119 webrtc/base/callback_unittest.cc:119: cb2 = cb; On 2015/11/30 08:45:51, tommi (webrtc) ...
5 years ago (2015-11-30 12:54:20 UTC) #6
tommi
lgtm. I'm fine with the template version that you had before for KeepRefUntilDone, but will ...
5 years ago (2015-11-30 13:05:01 UTC) #8
magjed_webrtc
lgtm https://codereview.webrtc.org/1487493002/diff/40001/webrtc/base/keep_ref_until_done.h File webrtc/base/keep_ref_until_done.h (right): https://codereview.webrtc.org/1487493002/diff/40001/webrtc/base/keep_ref_until_done.h#newcode28 webrtc/base/keep_ref_until_done.h:28: static inline Callback0<void> KeepRefUntilDone(RefCountInterface* object) { If you ...
5 years ago (2015-11-30 15:41:52 UTC) #9
magjed_webrtc
https://codereview.webrtc.org/1487493002/diff/40001/webrtc/base/callback_unittest.cc File webrtc/base/callback_unittest.cc (right): https://codereview.webrtc.org/1487493002/diff/40001/webrtc/base/callback_unittest.cc#newcode11 webrtc/base/callback_unittest.cc:11: #include <webrtc/base/keep_ref_until_done.h> This is not sorted anymore. Did you ...
5 years ago (2015-11-30 15:44:34 UTC) #10
perkj_webrtc
https://codereview.webrtc.org/1487493002/diff/40001/webrtc/base/callback_unittest.cc File webrtc/base/callback_unittest.cc (right): https://codereview.webrtc.org/1487493002/diff/40001/webrtc/base/callback_unittest.cc#newcode11 webrtc/base/callback_unittest.cc:11: #include <webrtc/base/keep_ref_until_done.h> On 2015/11/30 15:44:34, magjed_webrtc wrote: > This ...
5 years ago (2015-11-30 16:41:31 UTC) #12
magjed_webrtc
lgtm
5 years ago (2015-11-30 16:48:46 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1487493002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1487493002/60001
5 years ago (2015-11-30 16:49:13 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_TIMED_OUT, no build URL)
5 years ago (2015-11-30 18:39:37 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1487493002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1487493002/60001
5 years ago (2015-12-01 06:14:37 UTC) #20
commit-bot: I haz the power
Committed patchset #3 (id:60001)
5 years ago (2015-12-01 06:15:49 UTC) #22
commit-bot: I haz the power
5 years ago (2015-12-01 06:16:02 UTC) #24
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/14f4144a82558ec4da2d4962ef02b23f44967b6a
Cr-Commit-Position: refs/heads/master@{#10847}

Powered by Google App Engine
This is Rietveld 408576698