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

Issue 1409123005: Add methods for telling V8 how much memory audio/video is using. (Closed)

Created:
5 years, 2 months ago by DaleCurtis
Modified:
5 years, 1 month ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, feature-media-reviews_chromium.org, fs, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add methods for telling V8 how much memory audio/video is using. Adds GetMemoryUsage() methods to Demuxer and Pipeline. Pipeline returns the results via PipelineStatistics callbacks from the audio and video renderers. WebMediaPlayerImpl now recieves a method from the RenderFrameImpl for talking to the V8 isolate and notifying it of memory changes. This fixes a long standing issue of V8 not knowing how much memory the media elements are soaking up. BUG=447898 TEST=new unittests, original oom crash page doesn't crash. Committed: https://crrev.com/83266c7462e414731592d6e7946de4ccb10f8a5a Cr-Commit-Position: refs/heads/master@{#356900}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix mock filter. #

Total comments: 21

Patch Set 3 : Address comments. Add unittests. #

Total comments: 4

Patch Set 4 : Moar comments. #

Total comments: 3

Patch Set 5 : Fix unittest compile error. Add comment. #

Patch Set 6 : Fix html viewer. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -21 lines) Patch
M components/html_viewer/media_factory.cc View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M media/base/demuxer.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M media/base/mock_filters.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M media/base/pipeline.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/base/pipeline.cc View 1 2 3 1 chunk +7 lines, -5 lines 0 comments Download
M media/base/pipeline_status.h View 1 2 3 1 chunk +8 lines, -13 lines 0 comments Download
M media/blink/buffered_data_source.h View 1 chunk +3 lines, -0 lines 0 comments Download
M media/blink/buffered_data_source.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M media/blink/buffered_data_source_unittest.cc View 1 2 3 4 5 chunks +6 lines, -0 lines 0 comments Download
M media/blink/buffered_resource_loader.h View 1 chunk +3 lines, -0 lines 0 comments Download
M media/blink/buffered_resource_loader.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M media/blink/buffered_resource_loader_unittest.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl.h View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 5 chunks +29 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_params.h View 1 2 4 chunks +12 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_params.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M media/filters/audio_renderer_algorithm.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M media/filters/audio_renderer_algorithm.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M media/filters/audio_renderer_algorithm_unittest.cc View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M media/filters/chunk_demuxer.h View 1 chunk +1 line, -0 lines 0 comments Download
M media/filters/chunk_demuxer.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M media/filters/chunk_demuxer_unittest.cc View 1 2 4 chunks +4 lines, -0 lines 0 comments Download
M media/filters/ffmpeg_demuxer.h View 1 chunk +1 line, -0 lines 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M media/filters/ffmpeg_demuxer_unittest.cc View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M media/filters/video_renderer_algorithm.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M media/filters/video_renderer_algorithm.cc View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M media/filters/video_renderer_algorithm_unittest.cc View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
M media/renderers/audio_renderer_impl.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M media/renderers/audio_renderer_impl.cc View 1 2 3 chunks +8 lines, -0 lines 0 comments Download
M media/renderers/audio_renderer_impl_unittest.cc View 1 2 4 chunks +8 lines, -1 line 0 comments Download
M media/renderers/video_renderer_impl.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M media/renderers/video_renderer_impl.cc View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M media/renderers/video_renderer_impl_unittest.cc View 1 2 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 39 (14 generated)
DaleCurtis
Will add some tests once we agree on the high level strategy. +xhwang,wolenetz: please review ...
5 years, 2 months ago (2015-10-24 00:33:52 UTC) #3
wolenetz
cool stuff, Dale! I only looked deeply at ChunkDemuxer; I'll look more later if you ...
5 years, 2 months ago (2015-10-24 00:51:34 UTC) #4
DaleCurtis
https://codereview.chromium.org/1409123005/diff/1/media/filters/chunk_demuxer.cc File media/filters/chunk_demuxer.cc (right): https://codereview.chromium.org/1409123005/diff/1/media/filters/chunk_demuxer.cc#newcode1313 media/filters/chunk_demuxer.cc:1313: int64_t ChunkDemuxer::GetMemoryUsage() const { On 2015/10/24 00:51:34, wolenetz wrote: ...
5 years, 2 months ago (2015-10-24 00:55:56 UTC) #5
xhwang
lgtm % nits https://chromiumcodereview.appspot.com/1409123005/diff/20001/media/base/demuxer.h File media/base/demuxer.h (right): https://chromiumcodereview.appspot.com/1409123005/diff/20001/media/base/demuxer.h#newcode90 media/base/demuxer.h:90: virtual int64_t GetMemoryUsage() const = 0; ...
5 years, 1 month ago (2015-10-25 17:01:56 UTC) #6
wolenetz
heads-up: I'm ooo sick today; will be back and able to review tomorrow in more ...
5 years, 1 month ago (2015-10-26 16:49:38 UTC) #7
ulan
https://codereview.chromium.org/1409123005/diff/20001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1409123005/diff/20001/content/renderer/render_frame_impl.cc#newcode2147 content/renderer/render_frame_impl.cc:2147: base::Unretained(v8::Isolate::GetCurrent())), v8::Isolate::GetCurrent() is going to be deprecated. The V8 ...
5 years, 1 month ago (2015-10-27 12:02:26 UTC) #9
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1409123005/diff/20001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1409123005/diff/20001/content/renderer/render_frame_impl.cc#newcode2147 content/renderer/render_frame_impl.cc:2147: base::Unretained(v8::Isolate::GetCurrent())), On 2015/10/27 at 12:02:26, ulan wrote: > v8::Isolate::GetCurrent() ...
5 years, 1 month ago (2015-10-27 12:03:54 UTC) #10
DaleCurtis
jochen, ulan: PTAL. https://codereview.chromium.org/1409123005/diff/20001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1409123005/diff/20001/content/renderer/render_frame_impl.cc#newcode2147 content/renderer/render_frame_impl.cc:2147: base::Unretained(v8::Isolate::GetCurrent())), On 2015/10/27 12:03:54, jochen wrote: ...
5 years, 1 month ago (2015-10-27 23:14:20 UTC) #11
xhwang
lgtm++ https://codereview.chromium.org/1409123005/diff/40001/media/base/pipeline.cc File media/base/pipeline.cc (right): https://codereview.chromium.org/1409123005/diff/40001/media/base/pipeline.cc#newcode469 media/base/pipeline.cc:469: void Pipeline::OnUpdateStatistics(const PipelineStatistics& stats) { nit: In the ...
5 years, 1 month ago (2015-10-27 23:32:40 UTC) #13
DaleCurtis
https://codereview.chromium.org/1409123005/diff/40001/media/base/pipeline.cc File media/base/pipeline.cc (right): https://codereview.chromium.org/1409123005/diff/40001/media/base/pipeline.cc#newcode469 media/base/pipeline.cc:469: void Pipeline::OnUpdateStatistics(const PipelineStatistics& stats) { On 2015/10/27 23:32:40, xhwang ...
5 years, 1 month ago (2015-10-28 01:08:28 UTC) #14
ulan
lgtm https://codereview.chromium.org/1409123005/diff/20001/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/1409123005/diff/20001/media/blink/webmediaplayer_impl.cc#newcode253 media/blink/webmediaplayer_impl.cc:253: FROM_HERE, base::TimeDelta::FromMilliseconds(500), this, On 2015/10/27 23:14:20, DaleCurtis wrote: ...
5 years, 1 month ago (2015-10-28 13:22:10 UTC) #15
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1409123005/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1409123005/diff/60001/content/renderer/render_frame_impl.cc#newcode2146 content/renderer/render_frame_impl.cc:2146: base::Unretained(blink::mainThreadIsolate())), btw, it's important that you invoke this callback ...
5 years, 1 month ago (2015-10-28 14:41:26 UTC) #16
haraken
https://codereview.chromium.org/1409123005/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1409123005/diff/60001/content/renderer/render_frame_impl.cc#newcode2146 content/renderer/render_frame_impl.cc:2146: base::Unretained(blink::mainThreadIsolate())), On 2015/10/28 14:41:26, jochen wrote: > btw, it's ...
5 years, 1 month ago (2015-10-28 14:45:36 UTC) #17
jochen (gone - plz use gerrit)
lgtm
5 years, 1 month ago (2015-10-28 14:47:20 UTC) #18
DaleCurtis
https://codereview.chromium.org/1409123005/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1409123005/diff/60001/content/renderer/render_frame_impl.cc#newcode2146 content/renderer/render_frame_impl.cc:2146: base::Unretained(blink::mainThreadIsolate())), On 2015/10/28 14:45:36, haraken wrote: > On 2015/10/28 ...
5 years, 1 month ago (2015-10-28 17:56:01 UTC) #20
DaleCurtis
Thanks for the reviews everyone!
5 years, 1 month ago (2015-10-28 17:56:43 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1409123005/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1409123005/100001
5 years, 1 month ago (2015-10-28 17:57:53 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/132651)
5 years, 1 month ago (2015-10-28 18:20:38 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1409123005/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1409123005/120001
5 years, 1 month ago (2015-10-29 00:08:29 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/132845)
5 years, 1 month ago (2015-10-29 01:00:56 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1409123005/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1409123005/120001
5 years, 1 month ago (2015-10-29 15:32:05 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/88689)
5 years, 1 month ago (2015-10-29 17:42:06 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1409123005/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1409123005/120001
5 years, 1 month ago (2015-10-29 17:47:43 UTC) #37
commit-bot: I haz the power
Committed patchset #6 (id:120001)
5 years, 1 month ago (2015-10-29 18:43:27 UTC) #38
commit-bot: I haz the power
5 years, 1 month ago (2015-10-29 18:44:01 UTC) #39
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/83266c7462e414731592d6e7946de4ccb10f8a5a
Cr-Commit-Position: refs/heads/master@{#356900}

Powered by Google App Engine
This is Rietveld 408576698