Source release 15.2.0

This commit is contained in:
John W. Bruce
2019-06-28 16:02:52 -07:00
parent 2b26dee09c
commit 2990f23065
1236 changed files with 166886 additions and 142315 deletions

View File

@@ -1413,7 +1413,7 @@ void CdmImpl::OnSessionKeysChange(const CdmSessionId& session_id,
switch (it->second) {
case kKeyStatusUsable:
map[it->first] = kUsable;
break;
continue;
case kKeyStatusExpired: {
KeyStatusMap::const_iterator it_old = map.find(it->first);
if (it_old != map.end() && it_old->second == kReleased) {
@@ -1422,22 +1422,28 @@ void CdmImpl::OnSessionKeysChange(const CdmSessionId& session_id,
} else {
map[it->first] = kExpired;
}
break;
continue;
}
case kKeyStatusOutputNotAllowed:
map[it->first] = kOutputRestricted;
break;
continue;
case kKeyStatusUsableInFuture:
case kKeyStatusPending:
map[it->first] = kStatusPending;
break;
continue;
case kKeyStatusKeyUnknown:
case kKeyStatusInternalError:
map[it->first] = kInternalError;
break;
default:
LOGE("Unrecognized key status: %d", it->second);
map[it->first] = kInternalError;
break;
continue;
}
// If we get this far, the switch statement fell through, which is an error.
// We do this instead of having a default case in the switch so that the
// compiler will flag if someone fails to add a case for new enum members,
// while still handling the possibility of an invalid value sneaking into
// the map at runtime.
LOGE("Invalid key status %d. Reporting internal error.", it->second);
map[it->first] = kInternalError;
}
listener_->onKeyStatusesChange(session_id, has_new_usable_key);
@@ -1629,7 +1635,10 @@ class FileSystem::Impl {
widevine::Cdm::IStorage* storage_;
};
FileSystem::FileSystem() : impl_(new Impl()) { impl_->storage_ = host.storage; }
FileSystem::FileSystem() : impl_(new Impl()) {
assert(nullptr != host.storage);
impl_->storage_ = host.storage;
}
FileSystem::FileSystem(const std::string& origin, void* extra_data)
: impl_(new Impl()), origin_(origin) {
@@ -1656,7 +1665,7 @@ std::unique_ptr<File> FileSystem::Open(const std::string& file_path,
bool FileSystem::Exists(const std::string& file_path) {
if (!impl_) return false;
return file_path.empty() || impl_->storage_->exists(file_path);
return !file_path.empty() && impl_->storage_->exists(file_path);
}
bool FileSystem::Remove(const std::string& file_path) {

View File

@@ -86,6 +86,7 @@ void Properties::InitOnce() {
oem_crypto_use_userspace_buffers_ = use_userspace_buffers_;
provisioning_messages_are_binary_ = set_provisioning_messages_to_binary_;
allow_service_certificate_requests_ = false;
device_files_is_a_real_filesystem_ = false;
session_property_set_.reset(new CdmClientPropertySetMap());
}