Bug 1194891. P3 - don't share data for elements in PB mode. draft
authorJW Wang <jwwang@mozilla.com>
Thu, 06 Apr 2017 16:52:14 +0800
changeset 557704 52bc246fbcee99424dce763600c8722c3bdbc93b
parent 557703 66b817dfa81a7af16d6836fc5cf2658b7afc4ace
child 557705 668a337401c1bc276eaa3884f62a1347568fc3e7
push id52791
push userjwwang@mozilla.com
push dateFri, 07 Apr 2017 06:23:27 +0000
bugs1194891
milestone55.0a1
Bug 1194891. P3 - don't share data for elements in PB mode. MozReview-Commit-ID: 1B2RK8biYof
dom/media/MediaCache.h
--- 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