Bug 1356514 - remove the usage of nsContentUtils::IsInPrivateBrowsing() in HTMLMediaElement.cpp. r=Ehsan

Per bug 1194891 comment 35, use |NodePrincipal()->GetPrivateBrowsingId() > 0| instead.

MozReview-Commit-ID: Cu6geuTWhGz
This commit is contained in:
JW Wang
2017-04-18 14:26:32 +08:00
parent 01972632f3
commit 03dd9cb628

View File

@@ -4687,7 +4687,7 @@ nsresult HTMLMediaElement::InitializeDecoderForChannel(nsIChannel* aChannel,
LOG(LogLevel::Debug, ("%p Created decoder %p for type %s", this, decoder.get(), mimeType.get()));
bool isPrivateBrowsing = nsContentUtils::IsInPrivateBrowsing(OwnerDoc());
bool isPrivateBrowsing = NodePrincipal()->GetPrivateBrowsingId() > 0;
RefPtr<MediaResource> resource = MediaResource::Create(
decoder->GetResourceCallback(), aChannel, isPrivateBrowsing);