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

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: add NOTREACHED 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..7083da4e435d55a390854495b5367de3b0868c07 100644
--- a/content/browser/media/android/media_resource_getter_impl.cc
+++ b/content/browser/media/android/media_resource_getter_impl.cc
@@ -51,7 +51,13 @@ 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, "");
+ NOTREACHED();
+ 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