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

Issue 1565893002: Bug Fix: WebMediaPlayerMS Crashes (Closed)

Created:
4 years, 11 months ago by qiangchen
Modified:
4 years, 11 months ago
Reviewers:
DaleCurtis
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Bug Fix: WebMediaPlayerMS Crashes WebMediaPlayerMS owns WebMediaPlayerMSCompositor, but they live on two different threads, and then there is a chance that when WebMediaPlayerMS is destructed on the main thread, there are still tasks regarding WebMediaPlayerMSCompositor on the compositor thread, and finally crash will be observed. Pass weak pointer to the PostTask call, then when the object is destroyed, the task will be voided. BUG=572398 Committed: https://crrev.com/09aac57cf764382bc667203bf4afc46b821fe2fc Cr-Commit-Position: refs/heads/master@{#368472}

Patch Set 1 #

Patch Set 2 : WeakPtr #

Patch Set 3 : Still destroy WMPMSCompositor on compositor thread for clean up work safety. #

Total comments: 2

Patch Set 4 : WeakPtrFactory #

Total comments: 2

Patch Set 5 : Disallow Copy #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -3 lines) Patch
M content/renderer/media/webmediaplayer_ms_compositor.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms_compositor.cc View 1 2 3 3 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 16 (6 generated)
qiangchen
Should be a quick fix.
4 years, 11 months ago (2016-01-06 17:56:08 UTC) #2
DaleCurtis
We typically don't want to add more ref counted classes. Is it sufficient just to ...
4 years, 11 months ago (2016-01-06 23:13:13 UTC) #3
qiangchen
Done.
4 years, 11 months ago (2016-01-07 20:18:10 UTC) #4
DaleCurtis
https://codereview.chromium.org/1565893002/diff/40001/content/renderer/media/webmediaplayer_ms_compositor.h File content/renderer/media/webmediaplayer_ms_compositor.h (right): https://codereview.chromium.org/1565893002/diff/40001/content/renderer/media/webmediaplayer_ms_compositor.h#newcode53 content/renderer/media/webmediaplayer_ms_compositor.h:53: base::SupportsWeakPtr<WebMediaPlayerMSCompositor>) { Instead of using SupportsWeakPtr, can you just ...
4 years, 11 months ago (2016-01-07 21:05:46 UTC) #5
qiangchen
Done. https://codereview.chromium.org/1565893002/diff/40001/content/renderer/media/webmediaplayer_ms_compositor.h File content/renderer/media/webmediaplayer_ms_compositor.h (right): https://codereview.chromium.org/1565893002/diff/40001/content/renderer/media/webmediaplayer_ms_compositor.h#newcode53 content/renderer/media/webmediaplayer_ms_compositor.h:53: base::SupportsWeakPtr<WebMediaPlayerMSCompositor>) { On 2016/01/07 21:05:46, DaleCurtis wrote: > ...
4 years, 11 months ago (2016-01-08 17:10:12 UTC) #7
DaleCurtis
lgtm https://codereview.chromium.org/1565893002/diff/60001/content/renderer/media/webmediaplayer_ms_compositor.h File content/renderer/media/webmediaplayer_ms_compositor.h (right): https://codereview.chromium.org/1565893002/diff/60001/content/renderer/media/webmediaplayer_ms_compositor.h#newcode153 content/renderer/media/webmediaplayer_ms_compositor.h:153: }; Can you add a DISALLOW_COPY_AND_ASSIGN(...) while you're ...
4 years, 11 months ago (2016-01-08 18:56:17 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1565893002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1565893002/80001
4 years, 11 months ago (2016-01-08 22:03:10 UTC) #11
qiangchen
https://codereview.chromium.org/1565893002/diff/60001/content/renderer/media/webmediaplayer_ms_compositor.h File content/renderer/media/webmediaplayer_ms_compositor.h (right): https://codereview.chromium.org/1565893002/diff/60001/content/renderer/media/webmediaplayer_ms_compositor.h#newcode153 content/renderer/media/webmediaplayer_ms_compositor.h:153: }; On 2016/01/08 18:56:17, DaleCurtis wrote: > Can you ...
4 years, 11 months ago (2016-01-08 22:09:39 UTC) #12
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 11 months ago (2016-01-09 00:37:07 UTC) #14
commit-bot: I haz the power
4 years, 11 months ago (2016-01-09 00:39:17 UTC) #16
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/09aac57cf764382bc667203bf4afc46b821fe2fc
Cr-Commit-Position: refs/heads/master@{#368472}

Powered by Google App Engine
This is Rietveld 408576698