Граф коммитов

64083 Коммитов

Автор SHA1 Сообщение Дата
Gerald Squelart 732f34fc15 Bug 1371882 - MediaCache is now ref-counted - r=cpearce
MediaCacheStreams have owning shared pointers to their MediaCache, and
a MediaCache owns itself while an update is in flight.
A non-owning pointer `gMediaCache` is only used by GetMediaCache and
~MediaCache to manage the one file-backed MediaCache.

MozReview-Commit-ID: AQHuXWGrKt6

--HG--
extra : rebase_source : f256e20080b8701f87418209aa42c5a0fe3f5239
2017-06-15 15:02:25 +12:00
Gerald Squelart 16c8e8bc32 Bug 1371882 - Remove MediaBlockCacheBase::Close() - r=cpearce
The only external use of Close was always followed by an implicit destruction
(by resetting the RefPtr), so we don't need to expose it, and it can be done
from the destructor.

FileBlockCache keeps its Close() function for internal use.
Also, FileBlockCache::mIsOpen is redundant, as it's true iff mThread is not
null.

MozReview-Commit-ID: LV7YVrwJvGG

--HG--
extra : rebase_source : 23decadf249b9e63190b3e19d81edc4a090afcef
2017-06-15 14:10:05 +12:00
Gerald Squelart ac5fcad310 Bug 1371882 - Avoid MemoryBlockCache when combined sizes > 'media.memory_caches_combined_limit_...' - r=cpearce
Don't go over the lowest of 'media.memory_caches_combined_limit_kb'
(kilobytes) or 'media.memory_caches_combined_limit_pc_sysmem' (percents of
system memory).

Added more logging around creation/destruction of MediaCaches.

MozReview-Commit-ID: Cdz4ycyn1RR

--HG--
extra : rebase_source : 63168234f186c3ef9c0289a189a647d67d8526a4
2017-06-12 15:42:26 +12:00
Gerald Squelart 2f4776d6e2 Bug 1371882 - MediaCache uses MemoryBlockCache when content length is known - r=cpearce
MozReview-Commit-ID: 35A4Vc95NtB

--HG--
extra : rebase_source : 8cae198053b6b5ec062137176b8eba377f5bcc83
2017-06-09 18:56:34 +12:00
Gerald Squelart cb4bc96af2 Bug 1371882 - MEMORYBLOCKCACHE_ERRORS telemetry to catch unexpected errors without crashing - r=cpearce,francois
No errors are expected to happen in MemoryBlockCache (except a few
'InitAllocation', which would still be good to know about), but instead of
taking drastic measures in these cases (i.e., crash), I would prefer to
collect some telemetry first.

MozReview-Commit-ID: 4WdFS34lgzj

--HG--
extra : rebase_source : 5600d0b93d4d438d8cc9cf5a74d9fbf24fe2822e
2017-06-12 16:22:28 +12:00
Gerald Squelart b901a472b6 Bug 1371882 - Implement MemoryBlockCache - r=cpearce
Memory-backed block cache.
At initialization, allocates memory needed to store the expected content
length.
If MediaCache attempts to write/move beyond the expected size, we grow the
buffer accordingly, as we cannot fully trust HTTP headers. (Future patch will
ensure we put a limit to this growth.)

MozReview-Commit-ID: GHxYMGXYrwI

--HG--
rename : dom/media/MediaBlockCacheBase.h => dom/media/MemoryBlockCache.h
extra : rebase_source : 4fe263006839ba82a77d124f147adf5943cfa651
2017-06-09 15:37:23 +12:00
Gerald Squelart b3828d2355 Bug 1371882 - Rename MediaCache::mFileCache to mBlockCache - r=cpearce
Because blocks may not necessarily be held in files anymore.

MozReview-Commit-ID: 2GNc7B5w2Jt

--HG--
extra : rebase_source : 4ceda80ca6736b159d8b726cdcfb8d7f74cf8529
2017-06-14 17:01:46 +12:00
Gerald Squelart 98f4458011 Bug 1371882 - Virtualize FileBlockCache's API into MediaBlockCacheBase - r=cpearce
MozReview-Commit-ID: Eya0RWiyiEP

--HG--
rename : dom/media/FileBlockCache.h => dom/media/MediaBlockCacheBase.h
extra : rebase_source : e4e847924e2df5bf0e7f2b7e92068fc104ca9bb6
2017-06-09 14:26:22 +12:00
Gerald Squelart d891f9f0c5 Bug 1371882 - Remove FileBlockCache's dependency on Runnable - r=cpearce
This is necessary before we can make FileBlockCache depend on another
ref-counted base in the following patch.

MozReview-Commit-ID: 8bfNwQhY8k0

--HG--
extra : rebase_source : b216d0af3e4b5abb68532f2547597c4f04585a71
2017-06-09 14:51:17 +12:00
Gerald Squelart 527c7d3dee Bug 1371882 - If content length <= 'media.memory_cache_max_size', use a discrete memory-backed MediaCache - r=cpearce
MozReview-Commit-ID: HH1R6LjKkxb

--HG--
extra : rebase_source : 2ce35a504c6709624bc7d161003b8331f6f25d1e
2017-06-09 23:15:04 +12:00
Gerald Squelart d86f260baa Bug 1371882 - Move MEDIACACHESTREAM_NOTIFIED_LENGTH telemetry collection to MediaCacheStream::Init - r=cpearce
The initial telemetry collection was done in NotifyDataLength() because that
was the first point where the length was introduced; but some extra code was
needed to ensure that were collecting the first length.
Now that this initial length is passed directly to Init(), we can report that
number instead.
In the "worst" case, it will actually be a bit more correct about what we
initially wanted to report, i.e., the initial length given by the HTTP
response header; and it's what we really want to know, now that we are using
this number to make a decision about which MediaCache to use.

MozReview-Commit-ID: 11Th8pensZt

--HG--
extra : rebase_source : 97a6d2dcbfad6c9b37819bfe6471baff2ec7e335
2017-06-12 14:27:46 +12:00
Gerald Squelart 9c6ad7eb88 Bug 1371882 - MediaCacheStream::Init forwards the known content length to the MediaCache factory - r=cpearce
This will give enough information (for now) for GetMediaCache to decide whether
to use the (one global shared) file-backed MediaCache, or a discrete memory-
backed MediaCache.
(Note that GetMediaCache doesn't use this length yet in this patch.)

MozReview-Commit-ID: 5B2E3sIsc4k

--HG--
extra : rebase_source : 940e782665bf2c3640bbe7389fca02ea7c1482cd
2017-06-08 15:59:43 +12:00
Gerald Squelart 023730a1ca Bug 1371882 - Make gMediaCache private inside MediaCache, to avoid misuse - r=cpearce
MozReview-Commit-ID: 6MyKmG7DNaG

--HG--
extra : rebase_source : 0e26d2e405166de8f0160a78faf4cf52fd68fa9e
2017-06-08 17:12:13 +12:00
Gerald Squelart 703d03eb67 Bug 1371882 - Delay MediaCache destruction if update queued - r=cpearce
MozReview-Commit-ID: LIjZFUIrTtX

--HG--
extra : rebase_source : a17ee8d9eb1c32c19e92b4a0ca71a037f32c8459
2017-06-08 16:45:21 +12:00
Gerald Squelart 420fc822c0 Bug 1371882 - Removed unnecessary `gMediaCache->` from MediaCache member functions - r=cpearce
MozReview-Commit-ID: BKjH9hfoL5g

--HG--
extra : rebase_source : d83836ad127895197fba32cd69d282fe9b1c27df
2017-06-08 16:20:37 +12:00
Gerald Squelart d63ca8dd12 Bug 1371882 - MediaCacheStream::mInitialized is redundant, mMediaCache is non-null after initialization - r=cpearce
MozReview-Commit-ID: 6VIPMLmzuEP

--HG--
extra : rebase_source : 80df4e3bda168660812d420e26c6117c7ccc4b88
2017-06-09 13:48:06 +12:00
Gerald Squelart fc0f5efec9 Bug 1371882 - MediaCacheStream accesses its MediaCache through a member pointer - r=cpearce
MozReview-Commit-ID: CM1rXqAc4FT

--HG--
extra : rebase_source : a4eaadb9c4bd40034e16a811878cf7663b6a66ce
2017-06-08 17:30:40 +12:00
Gerald Squelart 54ab31eb36 Bug 1371882 - MediaCache::constructor/destructor/Init() don't need to be public - r=cpearce
MozReview-Commit-ID: 9naYvPbGn14

--HG--
extra : rebase_source : d1116e03d4bbef1c6bd1a6be676eb89605a78494
2017-06-09 12:53:11 +12:00
Gerald Squelart 901a3dbeea Bug 1371882 - static MediaCache::GetMediaCache to get file-backed MediaCache - r=cpearce
This is the new recommended way to create&initialize the file-backed
MediaCache.

In future patches, this will also allow the creation of memory-backed
MediaCache objects.

MozReview-Commit-ID: 6RUlNW2eBPP

--HG--
extra : rebase_source : 0b3e6fae71207076812b5cb9172d4497d3e68ea2
2017-06-08 15:09:40 +12:00
Gerald Squelart 2bfadd1441 Bug 1371882 - MediaCache::ResourceStreamIterator is given the MediaCache to work with - r=cpearce
MozReview-Commit-ID: 3Xl4WNESdnY

--HG--
extra : rebase_source : d69d52c68512041dd61c5782e3406aa66a487a28
2017-06-08 15:32:13 +12:00
Gerald Squelart fca2c5bdbd Bug 1371882 - MediaCacheFlusher allows for multiple MediaCache's - r=cpearce
MediaCacheFlusher constructs itself when needed by the first MediaCache, and
destroys itself when the last MediaCache unregisters itself.

Some MediaCache member functions had to be made non-static, so they could be
called for each instance.

MozReview-Commit-ID: 5Dh9mEKbZHg

--HG--
extra : rebase_source : 1570e30787ba486f9436b4b05aa3cfa0329d1ee7
2017-06-08 14:32:13 +12:00
Cameron McCormack ea96847844 Bug 1373155 - Disable Web Components in Servo-styled documents. r=wchen
MozReview-Commit-ID: 5IBBN2Gfazs

--HG--
extra : rebase_source : 832174c4b30627b77d247a762c0a525b3afb7885
2017-06-15 19:39:58 +08:00
Wes Kocher 208ec84119 Merge inbound to central, a=merge
MozReview-Commit-ID: AiSwcmvIrE
2017-06-15 16:22:40 -07:00
Sebastian Hengst 9b6197930c merge mozilla-central to autoland. r=merge a=merge 2017-06-15 20:13:40 +02:00
Sebastian Hengst 43c84014a1 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: HYo8pUZXJ8Z
2017-06-15 20:12:28 +02:00
Michael Layzell b24cba603e Bug 1369627 - Part 2: Send DimensionInfo down to the content process synchronously when creating a new window, r=smaug
MozReview-Commit-ID: GlzJ491RLUE
2017-06-15 14:34:48 -04:00
Michael Layzell f9f7306ed3 Bug 1369627 - Part 1: Add a test for the behavior of window.resizeBy right after opening a new window, r=smaug
MozReview-Commit-ID: GLqs4YU0lbX
2017-06-15 14:34:46 -04:00
Sebastian Hengst a672914c01 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-06-15 20:14:54 +02:00
Chih-Yi Leu 33ab8ec199 Bug 1371940 - Reset mStencilTestEnabled when initializing openGL context r=jgilbert
MozReview-Commit-ID: 3m78xXoObYY

--HG--
extra : rebase_source : d04f9d710d77583d2c0e144cba7cb2be53e6fea4
2017-06-14 16:10:25 +08:00
Sebastian Hengst 768c6d1b63 merge mozilla-central to autoland. r=merge a=merge 2017-06-15 11:15:42 +02:00
Sebastian Hengst 20d16dadd3 merge mozilla-inbount to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 36YqbsnO3en
2017-06-15 11:11:30 +02:00
Andrew Osmond 27eaaaed2f Bug 1365927 - Part 4. Replace PCompositorBridge integration hooks with PCompositorManager. r=dvander 2017-06-14 11:39:59 -04:00
Andrew Osmond a3d11c8688 Bug 1365927 - Part 1. Add missing headers and other build housekeeping. r=dvander 2017-06-14 11:39:59 -04:00
Mats Palmgren 185a60c094 Bug 1372327 - Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 5J6Ea73JX4f
2017-06-14 17:27:25 +02:00
Mats Palmgren 9fc0c76c2f Bug 1372356 part 2 - Use mWindowMap.LookupForAdd instead of Get+Put, and LookupRemoveIf instead of Get+Remove, to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 9L3GGGKDoJZ
2017-06-14 17:27:25 +02:00
Mats Palmgren 70e1ca483d Bug 1372356 - Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 4jKIhueYx13
2017-06-14 17:27:25 +02:00
Mats Palmgren 5f77c14065 Bug 1372349 - Use LookupForAdd instead of GetWeak+Put to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 37FVkb3vOO4
2017-06-14 17:27:25 +02:00
Mats Palmgren b909321f2a Bug 1372342 - Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: LAxL0tVtrFF
2017-06-14 17:27:25 +02:00
Mats Palmgren 95d8ecc7bf Bug 1372323 - Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: GWsRF1vSLXx
2017-06-14 17:27:25 +02:00
Mats Palmgren 45166146e9 Bug 1372274 - Use LookupForAdd instead of Get+Put, and LookupRemoveIf instead of Get+Remove, to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: Fo23d82qpaP
2017-06-14 17:27:25 +02:00
Nicolas B. Pierron 3fc61ce76c Bug 1372207 - Schedule JSBC encoding to be executed at the next idle time after the onload event. r=smaug 2017-06-14 14:37:14 +00:00
Mats Palmgren 966b2d65f8 Bug 1372268 - Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 1WVLTschGsj
2017-06-14 16:11:22 +02:00
Mats Palmgren 6ee98bf801 Bug 1372265 - Use LookupForAdd instead of Get+Put, and LookupRemoveIf instead of Get+Remove, to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 2CRTN27ltZx
2017-06-14 16:11:21 +02:00
Mats Palmgren 893dffd030 Bug 1372262 - Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 5LmOqXRgo25
2017-06-14 16:11:21 +02:00
Mats Palmgren 2c6dbe5497 Bug 1372259 - Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 5wTxn8HESyn
2017-06-14 16:11:21 +02:00
Mats Palmgren 287ff411c2 Bug 1372050 - Use LookupForAdd instead of Get+Put to avoid an unnecessary hashtable lookup. r=froydnj
MozReview-Commit-ID: FpPkNEuP5FR
2017-06-14 16:11:21 +02:00
Mats Palmgren 7edf472a8d Bug 1372048 - Use LookupForAdd instead of Contains+Get/Put to avoid an unnecessary hashtable lookup. r=froydnj
MozReview-Commit-ID: Anh9DdOjNc1
2017-06-14 16:11:21 +02:00
Mats Palmgren fb22ab5655 Bug 1372013 - Remove a redundant mFetchingModules.Get before Remove call, and replace Get+Put calls with a LookupRemoveIf call. r=froydnj
MozReview-Commit-ID: LDQkiin1hgf
2017-06-14 16:11:21 +02:00
Mats Palmgren 0b07470173 Bug 1372012 - Remove redundant hashtable Contains calls before Get. r=froydnj
MozReview-Commit-ID: 1RC4HY6Hya9
2017-06-14 16:11:21 +02:00
Mats Palmgren 36a3a728a9 Bug 1372011 - Use LookupForAdd instead of Contains+Put to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 57p6FeJnYAi
2017-06-14 16:11:21 +02:00