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

Issue 1688033005: Monitor VideoResourceUpdater reusing destructed resource in Debug mode. (Closed)

Created:
4 years, 10 months ago by xjz
Modified:
4 years, 9 months ago
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Monitor VideoResourceUpdater reusing destructed resource in Debug mode. VideoResourceUpdater software planes use VideoFrame raw pointer and video timestamp as the unique ID for each VideoFrame. However, if the VideoFrame is destructed and the pointer is reused by a new VideoFrame, and if the timestamp is not correctly set, the resource maybe incorrectly reused. This CL marks the resource as destructed when the original VideoFrame is destructed, and monitors if the destructed resource is re-used. The CL only takes effect in Debug mode. BUG=581480 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/66b273c41ace18613ce65175bbcf47f9bd3ddf94 Cr-Commit-Position: refs/heads/master@{#381739}

Patch Set 1 : #

Total comments: 2

Patch Set 2 : Rebase and add new VideoFrameMetada field. #

Total comments: 8

Patch Set 3 : #

Total comments: 4

Patch Set 4 : #

Total comments: 4

Patch Set 5 : Add VideoFrame destructor callback in Debug mode. #

Total comments: 6

Patch Set 6 : Address miu's comments. #

Total comments: 11

Patch Set 7 : #

Total comments: 2

Patch Set 8 : Rebase and address danakj's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -3 lines) Patch
M cc/resources/video_resource_updater.h View 1 2 3 4 5 6 7 2 chunks +14 lines, -0 lines 0 comments Download
M cc/resources/video_resource_updater.cc View 1 2 3 4 5 6 7 8 chunks +70 lines, -3 lines 0 comments Download

Messages

Total messages: 55 (21 generated)
xjz
PTAL
4 years, 10 months ago (2016-02-12 22:59:01 UTC) #5
miu
https://codereview.chromium.org/1688033005/diff/40001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/1688033005/diff/40001/cc/resources/video_resource_updater.cc#newcode120 cc/resources/video_resource_updater.cc:120: task_runner->PostTask(FROM_HERE, task); This will introduce an unknown time delay ...
4 years, 10 months ago (2016-02-19 02:47:46 UTC) #6
liberato (no reviews please)
drive-by review. please feel free to ignore. thanks -fl https://codereview.chromium.org/1688033005/diff/80001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/1688033005/diff/80001/cc/resources/video_resource_updater.cc#newcode135 cc/resources/video_resource_updater.cc:135: ...
4 years, 10 months ago (2016-02-19 23:50:52 UTC) #9
xjz
liberato: sorry missed your comments before deleting the old Patch Set 2. Some files were ...
4 years, 10 months ago (2016-02-20 00:35:32 UTC) #11
xjz
PTAL https://codereview.chromium.org/1688033005/diff/40001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/1688033005/diff/40001/cc/resources/video_resource_updater.cc#newcode120 cc/resources/video_resource_updater.cc:120: task_runner->PostTask(FROM_HERE, task); On 2016/02/19 02:47:46, miu wrote: > ...
4 years, 10 months ago (2016-02-20 00:40:47 UTC) #12
miu
https://codereview.chromium.org/1688033005/diff/100001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/1688033005/diff/100001/cc/resources/video_resource_updater.cc#newcode138 cc/resources/video_resource_updater.cc:138: bool video_frame_in_resource; There's a helper method in VideoFrameMetadata to ...
4 years, 10 months ago (2016-02-22 21:17:38 UTC) #13
xjz
PTAL https://codereview.chromium.org/1688033005/diff/100001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/1688033005/diff/100001/cc/resources/video_resource_updater.cc#newcode138 cc/resources/video_resource_updater.cc:138: bool video_frame_in_resource; On 2016/02/22 21:17:37, miu wrote: > ...
4 years, 10 months ago (2016-02-23 03:36:03 UTC) #15
miu
lgtm
4 years, 10 months ago (2016-02-23 03:40:55 UTC) #16
miu
On 2016/02/23 03:40:55, miu wrote: > lgtm Please rewrite the change description to match the ...
4 years, 10 months ago (2016-02-23 03:41:21 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1688033005/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1688033005/140001
4 years, 10 months ago (2016-02-23 06:25:33 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/148951)
4 years, 10 months ago (2016-02-23 06:35:23 UTC) #22
xjz
xhwang: needs owner's approval on video_frame_metadata.h. PTAL.
4 years, 10 months ago (2016-02-23 17:45:07 UTC) #24
xhwang
https://chromiumcodereview.appspot.com/1688033005/diff/140001/cc/resources/video_resource_updater.h File cc/resources/video_resource_updater.h (right): https://chromiumcodereview.appspot.com/1688033005/diff/140001/cc/resources/video_resource_updater.h#newcode118 cc/resources/video_resource_updater.h:118: // by the client. One question: Is it possible ...
4 years, 10 months ago (2016-02-23 17:48:51 UTC) #25
xjz
brianderson: PTAL. Need owner's approval on VideoResourceUpdater change.
4 years, 10 months ago (2016-02-23 17:50:03 UTC) #27
xhwang
https://chromiumcodereview.appspot.com/1688033005/diff/140001/media/base/video_frame_metadata.h File media/base/video_frame_metadata.h (right): https://chromiumcodereview.appspot.com/1688033005/diff/140001/media/base/video_frame_metadata.h#newcode81 media/base/video_frame_metadata.h:81: RESOURCE_UPDATER_FLAG, Also, media/base knows nothing about "cc" and "ResourceUpdater", ...
4 years, 10 months ago (2016-02-23 17:58:02 UTC) #28
xjz
Removed the new field in VideoFrameMetada. Instead, used base::SupportsUserData to set the userdata in VideoFrame ...
4 years, 10 months ago (2016-02-23 23:53:15 UTC) #29
danakj
https://codereview.chromium.org/1688033005/diff/160001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/1688033005/diff/160001/cc/resources/video_resource_updater.cc#newcode141 cc/resources/video_resource_updater.cc:141: plane_resource.timestamp == video_frame->timestamp() && Can you instead just return ...
4 years, 10 months ago (2016-02-23 23:55:09 UTC) #31
xjz
https://codereview.chromium.org/1688033005/diff/160001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/1688033005/diff/160001/cc/resources/video_resource_updater.cc#newcode141 cc/resources/video_resource_updater.cc:141: plane_resource.timestamp == video_frame->timestamp() && On 2016/02/23 23:55:09, danakj wrote: ...
4 years, 10 months ago (2016-02-24 00:01:28 UTC) #33
danakj
https://codereview.chromium.org/1688033005/diff/160001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/1688033005/diff/160001/cc/resources/video_resource_updater.cc#newcode141 cc/resources/video_resource_updater.cc:141: plane_resource.timestamp == video_frame->timestamp() && On 2016/02/24 00:01:28, xjz wrote: ...
4 years, 10 months ago (2016-02-24 00:07:08 UTC) #34
xjz
https://codereview.chromium.org/1688033005/diff/160001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/1688033005/diff/160001/cc/resources/video_resource_updater.cc#newcode141 cc/resources/video_resource_updater.cc:141: plane_resource.timestamp == video_frame->timestamp() && On 2016/02/24 00:07:08, danakj wrote: ...
4 years, 10 months ago (2016-02-24 21:57:58 UTC) #35
danakj
On Wed, Feb 24, 2016 at 1:57 PM, <xjz@chromium.org> wrote: > > > https://codereview.chromium.org/1688033005/diff/160001/cc/resources/video_resource_updater.cc > ...
4 years, 9 months ago (2016-02-29 22:38:25 UTC) #36
xjz
On 2016/02/29 22:38:25, danakj wrote: > On Wed, Feb 24, 2016 at 1:57 PM, <mailto:xjz@chromium.org> ...
4 years, 9 months ago (2016-03-08 23:06:37 UTC) #39
xjz
PTAL Please see the updated description for the change.
4 years, 9 months ago (2016-03-08 23:07:40 UTC) #40
miu
lgtm. Note to other reviewers: While this looks like quite a bit of extra code ...
4 years, 9 months ago (2016-03-09 01:59:49 UTC) #41
xhwang
lgtm even though you don't need my approval any more :)
4 years, 9 months ago (2016-03-09 23:33:15 UTC) #42
xjz
PTAL https://codereview.chromium.org/1688033005/diff/200001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/1688033005/diff/200001/cc/resources/video_resource_updater.cc#newcode159 cc/resources/video_resource_updater.cc:159: DCHECK(plane_resource.destructed == false) On 2016/03/09 01:59:49, miu wrote: ...
4 years, 9 months ago (2016-03-10 01:51:44 UTC) #43
xjz
On 2016/03/10 01:51:44, xjz wrote: > PTAL > > https://codereview.chromium.org/1688033005/diff/200001/cc/resources/video_resource_updater.cc > File cc/resources/video_resource_updater.cc (right): > ...
4 years, 9 months ago (2016-03-14 18:41:48 UTC) #44
danakj
https://chromiumcodereview.appspot.com/1688033005/diff/220001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://chromiumcodereview.appspot.com/1688033005/diff/220001/cc/resources/video_resource_updater.cc#newcode159 cc/resources/video_resource_updater.cc:159: DCHECK(!plane_resource.destructed) Can you maybe just add a Lock to ...
4 years, 9 months ago (2016-03-14 18:52:41 UTC) #45
xjz
PTAL https://codereview.chromium.org/1688033005/diff/220001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/1688033005/diff/220001/cc/resources/video_resource_updater.cc#newcode159 cc/resources/video_resource_updater.cc:159: DCHECK(!plane_resource.destructed) On 2016/03/14 18:52:41, danakj wrote: > Can ...
4 years, 9 months ago (2016-03-15 21:04:00 UTC) #46
danakj
LGTM w/ 1 more question https://codereview.chromium.org/1688033005/diff/220001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/1688033005/diff/220001/cc/resources/video_resource_updater.cc#newcode530 cc/resources/video_resource_updater.cc:530: video_frame->AddDestructionObserver(base::Bind( On 2016/03/15 21:04:00, ...
4 years, 9 months ago (2016-03-17 00:00:34 UTC) #47
xjz
https://codereview.chromium.org/1688033005/diff/240001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/1688033005/diff/240001/cc/resources/video_resource_updater.cc#newcode429 cc/resources/video_resource_updater.cc:429: static_cast<void*>(video_frame.get()), On 2016/03/17 00:00:34, danakj wrote: > can you ...
4 years, 9 months ago (2016-03-17 04:57:56 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1688033005/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1688033005/260001
4 years, 9 months ago (2016-03-17 16:43:48 UTC) #51
commit-bot: I haz the power
Committed patchset #8 (id:260001)
4 years, 9 months ago (2016-03-17 17:41:42 UTC) #53
commit-bot: I haz the power
4 years, 9 months ago (2016-03-17 17:43:28 UTC) #55
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/66b273c41ace18613ce65175bbcf47f9bd3ddf94
Cr-Commit-Position: refs/heads/master@{#381739}

Powered by Google App Engine
This is Rietveld 408576698