mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1596064 - Remove any access on the database when pref is off. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D52984 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
017284eed7
commit
dbabae6629
@ -906,6 +906,9 @@ void MediaFormatReader::ShutdownDecoder(TrackType aTrack) {
|
||||
|
||||
void MediaFormatReader::NotifyDecoderBenchmarkStore() {
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
if (!StaticPrefs::media_mediacapabilities_from_database()) {
|
||||
return;
|
||||
}
|
||||
auto& decoder = GetDecoderData(TrackInfo::kVideoTrack);
|
||||
if (decoder.GetCurrentInfo() && decoder.GetCurrentInfo()->GetAsVideoInfo()) {
|
||||
VideoInfo info = *(decoder.GetCurrentInfo()->GetAsVideoInfo());
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "DecoderBenchmark.h"
|
||||
#include "mozilla/BenchmarkStorageChild.h"
|
||||
#include "mozilla/media/MediaUtils.h"
|
||||
#include "mozilla/StaticPrefs_media.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@ -214,6 +215,10 @@ void DecoderBenchmark::CheckVersion(const nsACString& aDecoderName) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!StaticPrefs::media_mediacapabilities_from_database()) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsCString name(aDecoderName);
|
||||
int32_t version;
|
||||
if (!DecoderVersionTable().Get(name, &version)) {
|
||||
|
Loading…
Reference in New Issue
Block a user