Bug 1194891. P3 - don't share data for elements in PB mode.
MozReview-Commit-ID: 1B2RK8biYof
--- a/dom/media/MediaCache.h
+++ b/dom/media/MediaCache.h
@@ -220,17 +220,17 @@ public:
// This must be called (and return) before the ChannelMediaResource
// used to create this MediaCacheStream is deleted.
void Close();
// This returns true when the stream has been closed
bool IsClosed() const { return mClosed; }
// Returns true when this stream is can be shared by a new resource load
bool IsAvailableForSharing() const
{
- return !mClosed &&
+ return !mClosed && !mIsPrivateBrowsing &&
(!mDidNotifyDataEnded || NS_SUCCEEDED(mNotifyDataEndedStatus));
}
// Get the principal for this stream. Anything accessing the contents of
// this stream must have a principal that subsumes this principal.
nsIPrincipal* GetCurrentPrincipal() { return mPrincipal; }
// Ensure a global media cache update has run with this stream present.
// This ensures the cache has had a chance to suspend or unsuspend this stream.
// Called only on main thread. This can change the state of streams, fire