Skip to content
Permalink
Browse files
Bug 21792: Suppress MediaError.message when privacy.resistFingerprint…
…ing = true
  • Loading branch information
arthuredelstein committed May 2, 2017
1 parent 59cba8d commit 4de3452842e270be17ea9cc977a0535f23d86a3d
Showing with 7 additions and 1 deletion.
  1. +7 −1 dom/html/MediaError.cpp
@@ -7,6 +7,7 @@
#include "mozilla/dom/MediaError.h"
#include "nsDOMClassInfoID.h"
#include "mozilla/dom/MediaErrorBinding.h"
#include "nsContentUtils.h"

namespace mozilla {
namespace dom {
@@ -31,7 +32,12 @@ MediaError::MediaError(HTMLMediaElement* aParent, uint16_t aCode,
void
MediaError::GetMessage(nsAString& aResult) const
{
CopyUTF8toUTF16(mMessage, aResult);
if (nsContentUtils::IsCallerChrome() ||
!nsContentUtils::ShouldResistFingerprinting()) {
CopyUTF8toUTF16(mMessage, aResult);
} else {
aResult.Truncate();
}
}

JSObject*

0 comments on commit 4de3452

Please sign in to comment.