Commit Graph

188 Commits

Author SHA1 Message Date
JW Wang
eb912e4057 Bug 1418918. P2 - add thread/monitor assertions. r=bechen,gerald
MozReview-Commit-ID: 3J8pRFnpm77

--HG--
extra : rebase_source : 722b2f5df7d2b6f95d806b334a9382f80ac4ea07
extra : intermediate-source : cb6319d0c879e9d57a46ff261bb9e1d5a16e2ad9
extra : source : 5b99626480b1c190f03a61635b7a2174b38c87b1
2017-11-20 16:30:05 +08:00
JW Wang
106e488634 Bug 1418918. P1 - remove unused FlushPartialBlock(). r=bechen,gerald
MozReview-Commit-ID: GSda1KfPWXE

--HG--
extra : rebase_source : 8bb0b962e6fec586dd68587d6e43b542d37f6a2d
extra : intermediate-source : d58472fa128100ed3bbc8e07d4e72ac7cc5bfe09
extra : source : e3925d43d873e20ad95a48550f271b832f852b7d
2017-11-20 16:00:22 +08:00
JW Wang
ff8c3ed9fd Bug 1418917. P2 - NotifyClientSuspended() should check mClosed. r=bechen,gerald
MozReview-Commit-ID: 9mBPwfyfWCV

--HG--
extra : rebase_source : 7fc6194a99d656f8e9a80430e41486c2ab7f117c
extra : intermediate-source : a601c40d46b2db64372345a3c5e39a1eeab7e326
extra : source : b5d520b8ddbf9926fe6e3a87d667a6c10c9dde5f
2017-11-20 14:21:22 +08:00
JW Wang
e672887f6f Bug 1418917. P1 - run some functions off the main thread. r=bechen,gerald
MozReview-Commit-ID: Fn9OveV69hX

--HG--
extra : rebase_source : 36ed72bea695f07694d83c418ba45d89cf1f03be
extra : intermediate-source : e25c80e8ea6991b4f06bc4305b602c792a5b1e8a
extra : source : d20765cfa8575943c62b933563e36ee9ffa4e765
2017-11-16 15:41:36 +08:00
JW Wang
f874190157 Bug 1418430. P2 - simplify the if statement of "reopen on error". r=bechen,gerald
A truth table is listed to illustrate all conditions of length/offset/reopen.

The original code doesn't handle the following cases correctly:
1. length == offset == 0, shouldn't reopen the channel for there is no data to download.
2. length == -1 && offset > 0, should reopen the channel if seekable.

MozReview-Commit-ID: IisnrA8hK4M

--HG--
extra : rebase_source : c5826f314b09b2ae9c3e7f2cc1f6ce285fc612df
2017-11-22 11:21:57 +08:00
JW Wang
df2b00d7a6 Bug 1418430. P1 - always check "reopen on error" when a connection is closed. r=bechen,gerald
The server might send us fewer bytes than requested. So we also need
"reopen on error" in this case as well.

MozReview-Commit-ID: Fi82x4h1TZ0

--HG--
extra : rebase_source : 3a19838de9c11545f00778623735c7e9a5cb1439
2017-11-22 10:35:48 +08:00
JW Wang
a920cf49b3 Bug 1418219 - merge NotifyDataLength() and NotifyDataStarted(). r=bechen,gerald
MozReview-Commit-ID: g857eQ4YVK

--HG--
extra : rebase_source : 45e71baa300772442bba43f39eacefb571a523c9
extra : intermediate-source : d674e5a676212dae59b12e8173802be40de77bf7
extra : source : 21f73b0a0e59b7575794b317719abe7a39a984e0
2017-11-16 12:05:19 +08:00
JW Wang
c5401dfc03 Bug 1418213 - always run MediaCacheStream::NotifyDataReceived() off the main thread. r=bechen,gerald
MozReview-Commit-ID: GBQ0lEf8rVI

--HG--
extra : rebase_source : cbcd69dd220c06e2e1cc0d12e33d23ce2f4e21ef
extra : intermediate-source : 9e304fc5f5ee0b4d44f0e54a4cb2a6a9fe90979d
extra : source : 1b29a7cde3c40ba3a35ee19eee63ad68e6d12176
2017-11-15 17:56:10 +08:00
JW Wang
b3feb3794f Bug 1415090. P5 - remove MediaCacheStream::NotifyChannelRecreated(). r=bechen,gerald
NotifyDataEnded() runs off the main thread which might set mChannelEnded
wrongly after NotifyChannelRecreated reset it on the main thread.

We should reset the flags in NotifyDataStarted() which indicate a new load has begun.

MozReview-Commit-ID: Gi6PFXwMJqc

--HG--
extra : rebase_source : 85bb2c25a55cce4b3c3f023bf4c02fe5d1de7552
extra : source : 2f8c5518bf615f9190f87032568fc53037bc6fc1
2017-11-16 14:50:49 +08:00
JW Wang
a2fd07c6c9 Bug 1415090. P4 - don't modify mResourceID off the main thread. r=bechen,gerald
There are some works to do when we allow a stream whose download ends abnormally
to continue sharing the resource:

1. Abort Read() when download error happens. We might still have a chance to
   get all the data successfully. However, it doesn't really matter since
   the stream data is incomplete and we will encounter decode errors sooner
   or later.
2. Update() needs to check mChannelEnded since an ended stream will not
   download data needed by other streams.

MozReview-Commit-ID: LGCecQ5rpzq

--HG--
extra : rebase_source : 17a91a1cfd145344c3c0a29b80665cb99ce20746
extra : source : 0947c12b035acc9fba02e89dc87b3a17f84cf2e5
2017-11-15 16:45:57 +08:00
JW Wang
187b5299fb Bug 1415090. P3 - run MediaCacheStream::NotifyDataEnded() off the main thread. r=bechen,gerald
Since NotifyDataEnded() run its code asynchronously, it is possible that a new
channel is created and NotifyDataStarted() is called before NotifyDataEndedInternal()
has a chance to run. We check the load ID to exit the function if necessary.

We also need to fix data races when running NotifyDataEndedInternal() off the
main thread in next patches.

MozReview-Commit-ID: IIAc7dxHike

--HG--
extra : rebase_source : 58e45f924058a986b8d86bfaeff2791ee8a5f4bc
extra : intermediate-source : b2a7fa7514723e214b8da40cfc0ec40b1de9a345
extra : source : 1ff93dc8f8c451b804133c780cedef2ee3d348e5
2017-11-10 15:06:39 +08:00
JW Wang
54de8d43d3 Bug 1415090. P2 - move the "reopen on error" code from ChannelMediaResource::OnStopRequest() to MediaCacheStream::NotifyDataEnded(). r=bechen,gerald
MozReview-Commit-ID: BA1tSk6ZqPS

--HG--
extra : rebase_source : 7434d1052be71bdb3cd24f430081fe57e86c4c6d
extra : intermediate-source : eef8f69c9c0f6e50d20ae9c7e46396d597eef425
extra : source : 95f24d107ce05b1b69e5a5f269c50670c7a31bf1
2017-11-10 14:40:22 +08:00
JW Wang
5a99c6b197 Bug 1417774 - remove unused MediaResource::Tell(). r=bechen
MozReview-Commit-ID: 3qlP4sSh9kM

--HG--
extra : rebase_source : 4002fec6f8c43abb640f9206cd715f3ecb02b373
2017-11-15 17:18:52 +08:00
JW Wang
ecbca6c33e Bug 1416643. P2 - always access mDidNotifyDataEnded within the lock. r=bechen,gerald
MozReview-Commit-ID: 3us659lCEZE

--HG--
extra : rebase_source : 9deace7a2e83ae42132f593bb7c638c5e2977638
2017-11-15 15:24:26 +08:00
JW Wang
b88c401e49 Bug 1416643. P1 - remove checks for mDidNotifyDataEnded/mNotifyDataEndedStatus from IsAvailableForSharing(). r=bechen,gerald
We will need to modify these members off the main thead while IsAvailableForSharing()
is a main thread only function.

InitAsClone() will return an error if the original stream ends abnormally.

MozReview-Commit-ID: 1qRyboca2YZ

--HG--
extra : rebase_source : 4617a911a1de052833bd0085b883a8ae4d639c7d
2017-11-15 15:14:21 +08:00
JW Wang
3f7e23ff46 Bug 1416085 - use Span<> to replace low level pointer arithmetic in Read(). r=bechen,gerald
MozReview-Commit-ID: 6l7cG2Xn0R7

--HG--
extra : rebase_source : ce80c480f03cfbe170a7c5340cbac526aa4f7a23
extra : intermediate-source : f02f1542258668ea47203a51f807ece6429f0ace
extra : source : 28c38703128e47ee7808e68550d7fca9b2558d0a
2017-11-03 16:56:58 +08:00
JW Wang
406e41ed03 Bug 1412737. P2 - Read() should return only when enough bytes are read or EOS/error is encountered. r=bechen,gerald
This will remove the need to retry reading for the callers.

Note since data is usually downloaded faster than being consumed, we don't
benefit much in reading data from a partial block in the memory. Chances are
we still need to wait for the block to commit to the cache so the reader can
continue. So we change the code to always read data from the cache or from
the last block when it is completed (reaching EOS).

This change allows up to somewhat optimize NotifyDataReceived() which won't
have to wake up readers if no blocks are committed to the cache.

MozReview-Commit-ID: KwgNSOawuAE

--HG--
extra : rebase_source : af29b9f5d8b7ee1ed41bda5d23e1e94209e323b7
extra : intermediate-source : 863cb113d20b9cc1222de001bacbefa7eb8ac5c1
extra : source : 09683d9ffe477c27164769dc93e9eb9ee0af21bd
2017-11-01 16:53:29 +08:00
JW Wang
d0f5f6b094 Bug 1412737. P1 - improve error handling. r=bechen,gerald
MozReview-Commit-ID: 776P80x63y8

--HG--
extra : rebase_source : 4737175f074e546d8e667f99829079855f55f119
extra : intermediate-source : 610e5fa2452c58f2e6d4a973210342c6be71d90d
extra : source : 719772d4b77154b419e501eabbf466a679325720
2017-10-31 14:54:13 +08:00
JW Wang
1e7878c69a Bug 1415069 - Add a member to ChannelMediaResource to remember seekability of the channel. r=bechen,gerald
So it doesn't need to call mCacheStream.IsTransportSeekable() which needs to
take the lock and might block the main thread.

MozReview-Commit-ID: 99QVcSxzjCz

--HG--
extra : rebase_source : be71b065ce0334987efbfb67a5cf010ab0373d80
extra : source : 2de3f0baf1475e8ae3228a33cf4cf139cf923c37
2017-11-07 14:26:10 +08:00
JW Wang
c51610e0e4 Bug 1415766. P2 - move Seek() to private and tighten up some assertions. r=bechen,gerald
MozReview-Commit-ID: BBsXqKUrOi1

--HG--
extra : rebase_source : 1b785f50254ba824037b983896fc40e91eff801a
extra : intermediate-source : 6971ed66e78c4e1956bf0e382a04c1c8816dbaf8
extra : source : 6590c3f4691e9730858689839a5eb7b7143ceafb
2017-11-02 14:46:24 +08:00
JW Wang
cd5164d38d Bug 1415766. P1 - we never pass anything other than NS_SEEK_SET to Seek(). r=bechen,gerald
MozReview-Commit-ID: AgvapCwwSpr

--HG--
extra : rebase_source : 2ba05b44f228c3d9a9440202c024abbd5487282f
extra : intermediate-source : f2ec0fec7c544171e7567beed322349dfb8e59a8
extra : source : 8e34a87b250f800897a761d2ccd408959007d02b
2017-11-02 14:26:24 +08:00
JW Wang
f9f14101f3 Bug 1415397 - use Span<> to replace low level pointer arithmetic in ReadFromCache(). r=bechen,gerald
MozReview-Commit-ID: HH6KXtMfSIJ

--HG--
extra : rebase_source : 4d08fa14e2e218ad3e6b45ef240f3ced75321bd4
extra : intermediate-source : 6c2577bd71024ad031a86836c9c604bfef726b5a
extra : source : 1f0e76b45b7d89bcc10d59e302fe4b08e87cc96c
2017-11-02 11:36:56 +08:00
Sebastian Hengst
c99d035f00 Backed out changeset 3e95c596ad5b (bug 1415397) because backed out (bug 1412737 depended on it. a=backout on a CLOSED TREE 2017-11-08 19:31:20 +02:00
Narcis Beleuzu
b3eba51148 Backed out 4 changesets (bug 1412737)for frequent Windows talos-g4 timeouts. a=RyanVM
Backed out changeset 13b3569d56c4 (bug 1412737)
Backed out changeset b8ae4f1e89c9 (bug 1412737)
Backed out changeset dd35b8813ca1 (bug 1412737)
Backed out changeset 29e511fbcd62 (bug 1412737)
2017-11-08 18:52:15 +02:00
JW Wang
f53f02fb3e Bug 1415397 - use Span<> to replace low level pointer arithmetic in ReadFromCache(). r=bechen,gerald
MozReview-Commit-ID: HH6KXtMfSIJ

--HG--
extra : rebase_source : a6fe803e3e89a0f89c225e2415a233a945a6a716
extra : intermediate-source : 8c37409d77f675c89fd9b2fb276aa80c57d4eb7f
extra : source : 1f0e76b45b7d89bcc10d59e302fe4b08e87cc96c
2017-11-02 11:36:56 +08:00
JW Wang
a3d7fa09ea Bug 1412737. P4 - wake up readers only when we have blocks committed to the cache. r=bechen,gerald
Per P2 changes, a reader will always read data from the cache or from the last
block in the memory. NotifyDataReceived() will be slightly more efficient
if we don't wake up readers unnecessarily when there are no new blocks committed
to the cache.

MozReview-Commit-ID: 3UWHbvtEUmu

--HG--
extra : rebase_source : d8c97d275ca5df7deb56447ef55092ac3d110e7f
extra : source : 8acc253fb322c4b6defb03bbc5489b5b1877f375
2017-11-06 14:17:35 +08:00
JW Wang
f851f90063 Bug 1412737. P2 - Read() should return only when enough bytes are read or EOS/error is encountered. r=bechen,gerald
This will remove the need to retry reading for the callers.

Note since data is usually downloaded faster than being consumed, we don't
benefit much in reading data from a partial block in the memory. Chances are
we still need to wait for the block to commit to the cache so the reader can
continue. So we change the code to always read data from the cache or from
the last block when it is completed (reaching EOS).

This change allows up to somewhat optimize NotifyDataReceived() which won't
have to wake up readers if no blocks are committed to the cache.

MozReview-Commit-ID: KwgNSOawuAE

--HG--
extra : rebase_source : dcf61b2c43a7c030a0265979d75d18c63a3c41d0
extra : intermediate-source : 62e5895d3684b6fd00df7703156af5ea1f08bef3
extra : source : 09683d9ffe477c27164769dc93e9eb9ee0af21bd
2017-11-01 16:53:29 +08:00
JW Wang
7b251a2f79 Bug 1412737. P1 - improve error handling. r=bechen,gerald
MozReview-Commit-ID: 776P80x63y8

--HG--
extra : rebase_source : f2384a13f09e3606a7ee705ad3400afd1de738ba
extra : intermediate-source : e57ec5337931951f45b8a922c603e96088cf6ef9
extra : source : 719772d4b77154b419e501eabbf466a679325720
2017-10-31 14:54:13 +08:00
JW Wang
605a0bdc18 Bug 1414709 - use Span<> to replace low level pointer arithmetic in MediaCacheStream::NotifyDataReceived(). r=bechen,gerald
MozReview-Commit-ID: KIwws0qiCVK

--HG--
extra : rebase_source : 3e50c2047703b01f006cfec65c4b0667b47906af
extra : intermediate-source : fbb2cf22b5028b57762ce7e7e9f56526ad5e9727
extra : source : 4bfb8f2ed2afb6f74cae0caf34dd34b0a818a45a
2017-11-01 23:20:11 +08:00
JW Wang
8adc7a5bd8 Bug 1375772 - don't evict the block which is in the current cached range. r=cpearce
Evicting the block will result in a gap in the current cached range starting
from mStreamOffset to mChannelOffset. Then we have
|GetCachedDataEndInternal(mStreamOffset) < mChannelOffset| and MediaCache
will open a new channel to fill the gap which is bad.

This is exactly the issue described in bug 1347174 where we limit the readahead
size to prevent the problem above from happening.

However bug 1347174 is indeed a workaround instead of a fix. It works around
the issue by suspending the download before the cache is full and has to evict
some blocks to allow new data to come in.

We should let MediaCache suspend the channel if it is full or evict played
blocks if possible.

MozReview-Commit-ID: HuUsZLdHGuh

--HG--
extra : rebase_source : cdd9bdb5bc63589550bafd49f6e313244037d8dd
extra : intermediate-source : 90aaf942dfbfdff98ef3df412ed49141f3f50e55
extra : source : fc8bc1c456677b92884c80ecfe4d5074a610f81a
2017-11-02 18:12:20 +08:00
JW Wang
0dc60230e2 Bug 1411808. P3 - InitAsClone() shouldn't call |mMediaCache->OpenStream(this)| until initialization is done. r=gerald
We don't want MediaCache to use a half-initialized stream.

MozReview-Commit-ID: LjPLOYwy0Wd

--HG--
extra : rebase_source : a52a23fc6dce2a87ef2829254dcabe8176b2c28c
extra : intermediate-source : eb9c3d068ff4c3496831d80398012daebe8a5d52
extra : source : d980eb79f7a5219651ef710630cdf6dc3bd96195
2017-10-26 11:13:38 +08:00
JW Wang
68005e8e16 Bug 1411808. P2 - don't call mClient->IsSuspended() off the main thread in Update(). r=gerald
By mirroring the suspend status of the client, Update() is able to make
decisions on reading streams without calling mClient->IsSuspended().

MozReview-Commit-ID: G4gS2VGiMjj

--HG--
extra : rebase_source : bcdc1010fce47965c999df61666983c87e189670
extra : intermediate-source : 9dd8cfb80e29677e8cae866b2326dfb0aec5b6ae
extra : source : d20f640bf99478c9ba581e4979ec8091ef94e0f3
2017-10-24 11:25:41 +08:00
JW Wang
8b79428eb0 Bug 1411808. P1 - run Update() loops off the main thread. r=gerald
Note we will fix bugs required to run Update() off the main thread
in the following patches.

MozReview-Commit-ID: CYwT5kDjD9R

--HG--
extra : rebase_source : edef59353b5f56d5aecb6d58f5cc2a8dfb09c317
extra : intermediate-source : 995a34fb6af54d3f4ad2de479d7777860a957f98
extra : source : 8d86a14f877cf83584cf1e57020568037a35154a
2017-10-23 17:12:07 +08:00
JW Wang
df96a8bd16 Bug 1412205 - MediaCacheStream::Read() should update mStreamOffset before releasing the monitor. r=gerald
MediaCache::Update() depends on mStreamOffset to make decision whether to
read streams or not. It is important to update mStreamOffset before releasing
the monitor so Update() won't make wrong decisions based on the stale value.

MozReview-Commit-ID: 40jUk5xd6GR

--HG--
extra : rebase_source : 40f4a64d0b66886b3a12c374f1bda874f8853750
extra : intermediate-source : 20ad1ad39a1e0c128ffd16e3fa669c9db1bb9c98
extra : source : 04f82ee89d93d5c008e51746c9686b4298e5f44f
2017-10-27 13:56:46 +08:00
JW Wang
0f871ec228 Bug 1411803 - ensure MediaCache is deleted on the main thread. r=gerald
MozReview-Commit-ID: 4JzTyyPF1uT

--HG--
extra : rebase_source : 5ea6f6636c531a59dd303809c2124757aed6b5d4
extra : source : ef39a9de8d4e36776b97277e74007ceed86e3c89
2017-10-24 10:32:47 +08:00
JW Wang
c94f001983 Bug 1412181 - add a proxy to be registered with ClearOnShutdown() to clear MediaCache::sThread. r=gerald
MozReview-Commit-ID: 9SXSKTP9Twb

--HG--
extra : rebase_source : 1cec3d8e307c980e2634fdc43ff9333833cb5547
extra : source : 2fa3d4a310a6e5765ee51cd3115013434d4662e5
2017-10-27 11:38:53 +08:00
JW Wang
48defae102 Bug 1411805 - Update() needs to read some prefs off the main thread. r=gerald
MediaPrefs is our friend.

MozReview-Commit-ID: 3lz5oqUR9R9

--HG--
extra : rebase_source : 31efaf14c29182b00451705b189772aac23acd34
extra : source : 7e9c68fd5fa241fc1d015b352935c2efd0daa1e8
2017-10-24 10:13:30 +08:00
JW Wang
8715833c55 Bug 1411504. P7 - don't change mChannelOffset in MediaCache::Update(). r=gerald
This is a fix to P3.

Since seek is performed asynchronously by CacheClientSeek(), it is possible
for OnStopRequest() to come before Seek(). Changing mChannelOffset will
cause MediaCacheStream::NotifyDataEnded() to update mStreamLength incorrectly.

mChannelOffset should only be changed in response to channel activities such
as NotifyDataStarted() and NotifyDataReceived().

However, if MediaCache::Update() calls CacheClientSeek() without updating
mChannelOffset, next Update() might make a wrong decision and call CacheClientSeek()
again which is bad. So we add a member mSeekTarget to track if there is a pending
seek on which the stream reading decisions will be made.

MozReview-Commit-ID: VWP0vdlEYM

--HG--
extra : rebase_source : ea0d85bcbcc5d14f1554ebff3d10981a5b17e18a
extra : source : 339b9323b583849ac88e39da19670f6b26772877
2017-10-25 09:37:58 +08:00
JW Wang
8bd1a52d6a Bug 1411504. P6 - acquire the lock for the entire scope of Update(). r=gerald
For it is not safe to access mStreams without the lock off the main thread.

MozReview-Commit-ID: DjVlhxgjVj5

--HG--
extra : rebase_source : b584fe59712430acd4528e6b6cd01ae86dc5761f
extra : source : d7fd550934bfe6967638e42acb076882611792dd
2017-10-24 09:04:06 +08:00
JW Wang
a1a46cc301 Bug 1411504. P5 - handle CacheClientNotifySuspendedStatusChanged/QueueSuspendedStatusUpdate off the main thread. r=gerald
MozReview-Commit-ID: 7Wc1tvd3S6x

--HG--
extra : rebase_source : ac9c1da29b4b395c75ced50efc3210f90add4710
extra : source : f4c901cfc7a7510f4ff161406e35d60229e86b98
2017-10-24 10:00:23 +08:00
JW Wang
1196be8421 Bug 1411504. P4 - handle CacheClientResume/CacheClientSuspend off the main thread. r=gerald
MozReview-Commit-ID: GRbcNo7KtKH

--HG--
extra : rebase_source : 030c8808c7702dc8792b22250e3d414154014615
extra : source : 60d50a2829cde9ff2879270f983e23092ca9f426
2017-10-24 09:38:34 +08:00
JW Wang
7a1b18c3ec Bug 1411504. P3 - handle CacheClientSeek off the main thread for we will run Update() off the main thread. r=gerald
MozReview-Commit-ID: 7eavgwkTXx0

--HG--
extra : rebase_source : 26c5c1675281612e2753549839acb73f735b7bc8
extra : source : 42efd7bd8db58c5c42cc266d90100a7ec250ac15
2017-10-24 09:23:12 +08:00
JW Wang
c4b8566c71 Bug 1411504. P2 - merge NotifyDataStarted() and SetTransportSeekable(). r=gerald
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
2017-10-23 17:00:57 +08:00
JW Wang
1efcf7c612 Bug 1411504. P1 - always require MediaCache to have a thread to run Update() loops. r=gerald
MozReview-Commit-ID: AYVWuN9CU55

--HG--
extra : rebase_source : 0149e330533b96426bdc7817586df8bd85ec1d03
extra : source : c191b4aa350672a4b3c614a2ea5494cdcca71faf
2017-10-23 16:51:17 +08:00
JW Wang
da256ca76e Bug 1411476. P5 - dump debug info for ChannelMediaResource. r=gerald
MozReview-Commit-ID: GjdtrlNb948

--HG--
extra : rebase_source : 248f4926435118ddc8baa0f901c5e4ec3f699c64
2017-10-25 13:57:39 +08:00
JW Wang
09ecf06972 Bug 1406328 - shut down the MediaCache thread in ShutdownThreads phase. r=gerald
To avoid leaks caused by Dispatch() failures. See comment 0 for the detail.

MozReview-Commit-ID: 3lYxQNj1GPl

--HG--
extra : rebase_source : 8df990476a49544b475df39be789e3cb27853609
extra : intermediate-source : 012f42a1a9d46b0dafa31ca03da1c2bc4fc76d2e
extra : source : c6acb9362de9ab8d130104aaf102de2ecb27dc8f
2017-10-06 17:41:21 +08:00
Sebastian Hengst
6c8164a609 Backed out changeset 3ceb919e7e82 (bug 1406328) for build bustage at dom/media/MediaCache.cpp:301: 'ShutdownPhase' has not been declared. r=backout 2017-10-09 09:07:01 +02:00
JW Wang
31d4e49bd9 Bug 1406328 - shut down the MediaCache thread in ShutdownThreads phase. r=gerald
To avoid leaks caused by Dispatch() failures. See comment 0 for the detail.

MozReview-Commit-ID: 3lYxQNj1GPl

--HG--
extra : rebase_source : 3ea4958ba21e691f83dbdf36fd820e597d6c5d68
extra : intermediate-source : 012f42a1a9d46b0dafa31ca03da1c2bc4fc76d2e
extra : source : c6acb9362de9ab8d130104aaf102de2ecb27dc8f
2017-10-06 17:41:21 +08:00
JW Wang
b2cbe2833f Bug 1405962. P1 - give MediaCache a thread on which we will run data callbacks from the HTTP channel. r=gerald
MozReview-Commit-ID: Av7bFGx9SW

--HG--
extra : rebase_source : 296a6137ee63328e11eb11a8ee3430979cf8e5a8
extra : intermediate-source : 9634a9cd63e188799fe691cfe7108a173db503d5
extra : source : 43860a593eb810088adac150c0fa85cf8133ce17
2017-09-13 16:51:12 +08:00
Chris Pearce
56d3b01075 Bug 1405697 - Move SEEK_VS_READ_THRESHOLD to where it's used. r=jwwang
It's only used in MediaCache.cpp, so it may as well be defined there.

MozReview-Commit-ID: HcA499xFOUg

--HG--
extra : rebase_source : f25c30d6e9be10549af80d5dfa963ef66abac576
2017-10-04 16:55:50 +02:00