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

Issue 534063002: Remove OnMediaResourcesReleased callback passed to MediaPlayerAndroid (Closed)

Created:
6 years, 3 months ago by qinmin
Modified:
6 years, 3 months ago
Reviewers:
xhwang
CC:
chromium-reviews, darin-cc_chromium.org, jam, avayvod+watch_chromium.org, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Remove OnMediaResourcesReleased callback passed to MediaPlayerAndroid This callback has the reentrance issue as calling MediaPlayerBridge::Release() will call into function. The worst case happens when BrowserMediaPlayerManager dtor is called. In that case, this function will be called on each player, while BMPM is in a partially destroyed state. Since BMPM controls the lifetime of the players, it can call OnMediaResourcesReleased() when it calls Release() on a player. For MSE case, we also simplified the situation here since we can check MSP::IsSurfaceInUse(). This CL also fixes that call. BUG=410096 Committed: https://crrev.com/0b08967cc3c1a8e6bc17921201553bb6d8a7bb90 Cr-Commit-Position: refs/heads/master@{#293207}

Patch Set 1 #

Total comments: 6

Patch Set 2 : addressing comments #

Patch Set 3 : make ReleaseMediaResources non-virtual #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -68 lines) Patch
M content/browser/media/android/browser_media_player_manager.h View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M content/browser/media/android/browser_media_player_manager.cc View 1 8 chunks +12 lines, -10 lines 0 comments Download
M media/base/android/media_decoder_job.h View 1 chunk +0 lines, -3 lines 0 comments Download
M media/base/android/media_decoder_job.cc View 1 chunk +0 lines, -1 line 0 comments Download
M media/base/android/media_player_android.h View 2 chunks +0 lines, -6 lines 0 comments Download
M media/base/android/media_player_android.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M media/base/android/media_player_bridge.h View 2 chunks +2 lines, -4 lines 0 comments Download
M media/base/android/media_player_bridge.cc View 2 chunks +0 lines, -3 lines 0 comments Download
M media/base/android/media_source_player.h View 2 chunks +0 lines, -4 lines 0 comments Download
M media/base/android/media_source_player.cc View 4 chunks +1 line, -5 lines 0 comments Download
M media/base/android/media_source_player_unittest.cc View 7 chunks +1 line, -18 lines 0 comments Download
M media/base/android/video_decoder_job.h View 2 chunks +0 lines, -3 lines 0 comments Download
M media/base/android/video_decoder_job.cc View 3 chunks +0 lines, -6 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
qinmin
PTAL
6 years, 3 months ago (2014-09-03 00:56:16 UTC) #2
xhwang
lgtm % nits https://codereview.chromium.org/534063002/diff/1/content/browser/media/android/browser_media_player_manager.cc File content/browser/media/android/browser_media_player_manager.cc (right): https://codereview.chromium.org/534063002/diff/1/content/browser/media/android/browser_media_player_manager.cc#newcode578 content/browser/media/android/browser_media_player_manager.cc:578: OnMediaResourcesReleased(player_id); This pattern appeared 3 times: ...
6 years, 3 months ago (2014-09-03 16:36:58 UTC) #3
qinmin
https://codereview.chromium.org/534063002/diff/1/content/browser/media/android/browser_media_player_manager.cc File content/browser/media/android/browser_media_player_manager.cc (right): https://codereview.chromium.org/534063002/diff/1/content/browser/media/android/browser_media_player_manager.cc#newcode578 content/browser/media/android/browser_media_player_manager.cc:578: OnMediaResourcesReleased(player_id); On 2014/09/03 16:36:58, xhwang wrote: > This pattern ...
6 years, 3 months ago (2014-09-03 18:27:52 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/534063002/40001
6 years, 3 months ago (2014-09-03 18:38:24 UTC) #7
commit-bot: I haz the power
Committed patchset #3 (id:40001) as bc9e95e89a6fa3f131fc48a4ba034f037d4643c4
6 years, 3 months ago (2014-09-03 21:52:00 UTC) #8
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:28:07 UTC) #9
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/0b08967cc3c1a8e6bc17921201553bb6d8a7bb90
Cr-Commit-Position: refs/heads/master@{#293207}

Powered by Google App Engine
This is Rietveld 408576698