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

Issue 2783273002: Fix DCHECK getting hit on destruction of GpuJpegDecodeAcceleratorHost (Closed)

Created:
3 years, 8 months ago by chfremer
Modified:
3 years, 8 months ago
CC:
chromium-reviews, posciak+watch_chromium.org, piman+watch_chromium.org, feature-media-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix DCHECK getting hit on destruction of GpuJpegDecodeAcceleratorHost The previous fix for a deadlock (https://codereview.chromium.org/2786503002/) was only partly effective. Even though it prevented the deadlock waiting for a method that was never run, it now hits a DCHECK when the WeakPtrs are invalidated on the wrong thread (synchronously as part of the destructor call). To prevent this, we add a |io_task_runner_->DeleteSoon(weak_factory_for_io_)| to the destructor of GpuJpegDecodeAcceleratorHost::Receiver. When |io_task_runner_| no longer accepts tasks, this effectively leaks |weak_factory_for_io_|, and therefore avoids hitting the DCHECK. BUG=706186 TEST= content_browsertests --gtest_filter="VideoCaptureBrowserTest.*" content_unittests --gtest_filter="*Video*" CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2783273002 Cr-Commit-Position: refs/heads/master@{#461053} Committed: https://chromium.googlesource.com/chromium/src/+/b5d9d73d3108767c038c2b9a8d6aff786edbaa1e

Patch Set 1 #

Total comments: 6

Patch Set 2 : Incorporated suggestions from PatchSet 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -9 lines) Patch
M media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc View 1 4 chunks +18 lines, -9 lines 0 comments Download

Messages

Total messages: 19 (13 generated)
chfremer
sandersd@: PTAL
3 years, 8 months ago (2017-03-30 17:09:11 UTC) #4
sandersd (OOO until July 31)
https://codereview.chromium.org/2783273002/diff/1/media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc File media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc (right): https://codereview.chromium.org/2783273002/diff/1/media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc#newcode35 media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc:35: base::MakeUnique<base::WeakPtrFactory<Receiver>>(this)) { I recommend creating a WeakPtr here in ...
3 years, 8 months ago (2017-03-30 20:58:50 UTC) #6
chfremer
PTAL https://codereview.chromium.org/2783273002/diff/1/media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc File media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc (right): https://codereview.chromium.org/2783273002/diff/1/media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc#newcode35 media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc:35: base::MakeUnique<base::WeakPtrFactory<Receiver>>(this)) { On 2017/03/30 20:58:50, sandersd wrote: > ...
3 years, 8 months ago (2017-03-30 21:19:45 UTC) #10
sandersd (OOO until July 31)
lgtm
3 years, 8 months ago (2017-03-30 21:25:03 UTC) #12
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/2783273002/20001
3 years, 8 months ago (2017-03-31 05:57:10 UTC) #16
commit-bot: I haz the power
3 years, 8 months ago (2017-03-31 06:04:58 UTC) #19
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/b5d9d73d3108767c038c2b9a8d6a...

Powered by Google App Engine
This is Rietveld 408576698