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

Unified Diff: content/browser/media/android/media_resource_getter_impl.cc

Issue 601043003: Speculative fix when translating blob data to a file path (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/android/media_player_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/android/media_resource_getter_impl.cc
diff --git a/content/browser/media/android/media_resource_getter_impl.cc b/content/browser/media/android/media_resource_getter_impl.cc
index 7c0a66efc536c8af72882fe7846070da991a8a75..bf8ab2782069b5e713518d2db4c2b7ad018b4794 100644
--- a/content/browser/media/android/media_resource_getter_impl.cc
+++ b/content/browser/media/android/media_resource_getter_impl.cc
@@ -51,7 +51,12 @@ static void RequestPlatformPathFromBlobURL(
ChromeBlobStorageContext::GetFor(browser_context);
scoped_ptr<storage::BlobDataHandle> handle =
context->context()->GetBlobDataFromPublicURL(url);
- const std::vector<storage::BlobData::Item> items = handle->data()->items();
+ storage::BlobData* data = handle->data();
+ if (!data) {
+ ReturnResultOnUIThread(callback, "");
xhwang 2014/09/25 23:11:11 If this shouldn't happen, add a NOTREACHED so that
qinmin 2014/09/26 18:48:49 Done.
+ return;
+ }
+ const std::vector<storage::BlobData::Item> items = data->items();
// TODO(qinmin): handle the case when the blob data is not a single file.
DLOG_IF(WARNING, items.size() != 1u)
« no previous file with comments | « no previous file | media/base/android/media_player_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698