Bug 1570212 - Convert media.video_stats.enabled to a static pref. r=jya
Also remove HTMLVideoElement::InitStatics(), which is no longer needed. Differential Revision: https://phabricator.services.mozilla.com/D40340
This commit is contained in:
@@ -51,8 +51,6 @@ nsGenericHTMLElement* NS_NewHTMLVideoElement(
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
static bool sVideoStatsEnabled;
|
||||
|
||||
nsresult HTMLVideoElement::Clone(mozilla::dom::NodeInfo* aNodeInfo,
|
||||
nsINode** aResult) const {
|
||||
*aResult = nullptr;
|
||||
@@ -417,14 +415,10 @@ bool HTMLVideoElement::SetVisualCloneSource(
|
||||
}
|
||||
|
||||
/* static */
|
||||
void HTMLVideoElement::InitStatics() {
|
||||
Preferences::AddBoolVarCache(&sVideoStatsEnabled,
|
||||
"media.video_stats.enabled");
|
||||
bool HTMLVideoElement::IsVideoStatsEnabled() {
|
||||
return StaticPrefs::media_video_stats_enabled();
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool HTMLVideoElement::IsVideoStatsEnabled() { return sVideoStatsEnabled; }
|
||||
|
||||
double HTMLVideoElement::TotalPlayTime() const {
|
||||
double total = 0.0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user