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

Issue 2164503002: Do not delete blink::WebRTCCertificateCallback on non-main thread (Closed)

Created:
4 years, 5 months ago by tzik
Modified:
4 years, 4 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, jam, gavinp+memory_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Do not delete blink::WebRTCCertificateCallback on non-main thread blink::WebRTCCertificateCallback has a blink::Persistent, which can not be destroyed on the original thread. However, RTC implementation brings it to a worker thread and occasionally deletes it on that thread, in case the main thread is already gone. This CL replaces the deleter of the std::unique_ptr that holds WebRTCCertificateCallback with OnTaskRunnerDeleter, which ensures the objects is deleted on the original thread. BUG=627004 Committed: https://crrev.com/edbd386e6c520cf327e530f65988587eea25d65c Cr-Commit-Position: refs/heads/master@{#411965}

Patch Set 1 #

Patch Set 2 : +test #

Patch Set 3 : fix #

Patch Set 4 : fix #

Total comments: 12

Patch Set 5 : -copy ctor & assign from OnTaskRunnerDeleter #

Patch Set 6 : readd #

Patch Set 7 : +std::move, -auto, s/std::move/&/ #

Total comments: 4

Patch Set 8 : -wrapUnique #

Patch Set 9 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -3 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gyp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M base/sequenced_task_runner.h View 5 1 chunk +18 lines, -0 lines 0 comments Download
M base/sequenced_task_runner.cc View 1 2 3 4 5 6 1 chunk +13 lines, -0 lines 0 comments Download
A base/sequenced_task_runner_unittest.cc View 1 2 3 4 5 6 1 chunk +76 lines, -0 lines 0 comments Download
M content/renderer/media/rtc_certificate_generator.cc View 1 2 3 4 5 6 4 chunks +11 lines, -3 lines 0 comments Download

Messages

Total messages: 52 (36 generated)
tzik
PTAL
4 years, 5 months ago (2016-07-19 12:35:16 UTC) #16
hbos_chromium
lgtm https://codereview.chromium.org/2164503002/diff/60001/base/sequenced_task_runner.cc File base/sequenced_task_runner.cc (right): https://codereview.chromium.org/2164503002/diff/60001/base/sequenced_task_runner.cc#newcode42 base/sequenced_task_runner.cc:42: OnTaskRunnerDeleter&&) = default; Why do you need to ...
4 years, 5 months ago (2016-07-20 12:42:32 UTC) #17
tzik
https://codereview.chromium.org/2164503002/diff/60001/base/sequenced_task_runner.cc File base/sequenced_task_runner.cc (right): https://codereview.chromium.org/2164503002/diff/60001/base/sequenced_task_runner.cc#newcode42 base/sequenced_task_runner.cc:42: OnTaskRunnerDeleter&&) = default; On 2016/07/20 12:42:32, hbos_chromium wrote: > ...
4 years, 5 months ago (2016-07-20 14:37:50 UTC) #19
tzik
https://codereview.chromium.org/2164503002/diff/60001/base/sequenced_task_runner.h File base/sequenced_task_runner.h (right): https://codereview.chromium.org/2164503002/diff/60001/base/sequenced_task_runner.h#newcode158 base/sequenced_task_runner.h:158: explicit OnTaskRunnerDeleter(scoped_refptr<SequencedTaskRunner> task_runner); On 2016/07/20 14:37:50, tzik wrote: > ...
4 years, 5 months ago (2016-07-20 14:42:27 UTC) #21
hbos_chromium
I see! https://codereview.chromium.org/2164503002/diff/60001/base/sequenced_task_runner.h File base/sequenced_task_runner.h (right): https://codereview.chromium.org/2164503002/diff/60001/base/sequenced_task_runner.h#newcode158 base/sequenced_task_runner.h:158: explicit OnTaskRunnerDeleter(scoped_refptr<SequencedTaskRunner> task_runner); On 2016/07/20 14:42:26, tzik ...
4 years, 5 months ago (2016-07-20 15:15:39 UTC) #25
dcheng
https://codereview.chromium.org/2164503002/diff/60001/base/sequenced_task_runner.cc File base/sequenced_task_runner.cc (right): https://codereview.chromium.org/2164503002/diff/60001/base/sequenced_task_runner.cc#newcode33 base/sequenced_task_runner.cc:33: : task_runner_(task_runner) { Nit: std::move() https://codereview.chromium.org/2164503002/diff/60001/base/sequenced_task_runner_unittest.cc File base/sequenced_task_runner_unittest.cc (right): ...
4 years, 5 months ago (2016-07-22 06:12:04 UTC) #28
tzik
https://codereview.chromium.org/2164503002/diff/60001/base/sequenced_task_runner.cc File base/sequenced_task_runner.cc (right): https://codereview.chromium.org/2164503002/diff/60001/base/sequenced_task_runner.cc#newcode33 base/sequenced_task_runner.cc:33: : task_runner_(task_runner) { On 2016/07/22 06:12:04, dcheng wrote: > ...
4 years, 5 months ago (2016-07-22 07:27:21 UTC) #31
dcheng
https://codereview.chromium.org/2164503002/diff/140001/base/memory/ptr_util.h File base/memory/ptr_util.h (right): https://codereview.chromium.org/2164503002/diff/140001/base/memory/ptr_util.h#newcode17 base/memory/ptr_util.h:17: std::unique_ptr<T, D> WrapUnique(T* ptr, D deleter = D()) { ...
4 years, 5 months ago (2016-07-22 07:29:00 UTC) #32
tzik
https://codereview.chromium.org/2164503002/diff/140001/base/memory/ptr_util.h File base/memory/ptr_util.h (right): https://codereview.chromium.org/2164503002/diff/140001/base/memory/ptr_util.h#newcode17 base/memory/ptr_util.h:17: std::unique_ptr<T, D> WrapUnique(T* ptr, D deleter = D()) { ...
4 years, 5 months ago (2016-07-22 08:14:53 UTC) #35
dcheng
//base LGTM, under the assumption that we'll be adding more uses of this throughout the ...
4 years, 5 months ago (2016-07-25 03:01:48 UTC) #38
perkj_chrome
I hope you have not waited for me. (Vacation) hbos knows much more about the ...
4 years, 4 months ago (2016-08-15 05:43:39 UTC) #39
tzik
On 2016/07/25 03:01:48, dcheng wrote: > //base LGTM, under the assumption that we'll be adding ...
4 years, 4 months ago (2016-08-15 14:07:17 UTC) #42
tzik
On 2016/08/15 05:43:39, perkj_chrome wrote: > I hope you have not waited for me. (Vacation) ...
4 years, 4 months ago (2016-08-15 14:07:45 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2164503002/180001
4 years, 4 months ago (2016-08-15 15:08:59 UTC) #48
commit-bot: I haz the power
Committed patchset #9 (id:180001)
4 years, 4 months ago (2016-08-15 15:12:34 UTC) #50
commit-bot: I haz the power
4 years, 4 months ago (2016-08-15 15:14:18 UTC) #52
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/edbd386e6c520cf327e530f65988587eea25d65c
Cr-Commit-Position: refs/heads/master@{#411965}

Powered by Google App Engine
This is Rietveld 408576698