SetTransportSeekable() is always called after NotifyDataStarted().
This is slightly more efficient for we don't acquire the lock twice.
MozReview-Commit-ID: 9myolomriIQ
--HG--
extra : rebase_source : f33c3be978edacf45d8144af43f45c8ad5e7b53e
extra : source : 2cefaeb1adae7238b77d5e2d1287ae0d96d9f671
We queried 'loadingprincipal' attribute on the common call path, however
this should be queried if it's loaded by System Principal.
Also rename loadingprincipal to triggeringprincipal
It's only used in ChannelMediaResource.cpp, so it may as well be in there.
MozReview-Commit-ID: 5lyeFOoUsUN
--HG--
extra : rebase_source : 15aa06371c90e379e31383d2a8527d865944a4c3
See comment 0 for the rationale. We check |aRequest != mResource->mChannel|
to know if a new channel is being loaded and the call should be aborted.
MozReview-Commit-ID: 6G1x7cXNvAq
--HG--
extra : rebase_source : 3114979192346e257f5d8040b8e0ffffa419d3f5
extra : source : eeb067bc2905dfa6fb5764fd42ebb78e1b71a61d
See comment 0 for the rationale.
The principal will not change after OnStartRequest().
MozReview-Commit-ID: K2HyWBBzGmC
--HG--
extra : rebase_source : 1d913390b1b94923d859bdb5f6e8d34d3f0ed60d
The load ID works as follows:
1. A load ID is passed to MediaCacheStream::NotifyDataStarted()
when loading a new channel.
2. Each MediaCacheStream::NotifyDataReceived() call is also associated
with a load ID from which the data is received.
3. If |mLoadID != aLoadID| tests to be true in NotifyDataReceived(), it means
the data is from an old channel and should be discarded.
4. MediaCache::Update() reset mLoadID for the stream before calling
CacheClientSeek() to prevent data from the old channel from being
stored to the wrong position.
MozReview-Commit-ID: 9kBoublLlln
--HG--
extra : rebase_source : 58e6d3fe40ec7a549cabc70b30db8006b49c0563
This keeps us in a good shape that NotifyDataStarted() is always called
before subsequent NotifyDataReceived() calls. This is also required by P3
where we need to set the loadID before NotifyDataReceived().
MozReview-Commit-ID: 9TPodkMM4EH
--HG--
extra : rebase_source : 0079e3ae6b791c64c76ca3bc3faac46039fc48fc