Commit Graph

102 Commits

Author SHA1 Message Date
Frederik Braun
a7153982e8 Bug 1366973: Rename security flags to not contain DATA anymore r=geckoview-reviewers,ckerschb,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83490
2020-07-15 11:20:45 +00:00
Simon Giesecke
cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Alexey
6e308813a6 Bug 1532722 - Include cookies in ChannelMediaResource requests when CORS mode is use-credentials. r=bryce
Credit for fixing this goes to Alexey <a.s.datsyuk.s@gmail.com>.

Differential Revision: https://phabricator.services.mozilla.com/D59625

--HG--
extra : moz-landing-system : lando
2020-01-14 16:40:28 +00:00
Andreas Pehrson
649925ecff Bug 1500049 - Wait for MediaCacheStreams to close properly before finishing MediaDecoder shutdown. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D52052

--HG--
extra : moz-landing-system : lando
2019-11-13 22:40:14 +00:00
Csoregi Natalia
6ba30843e8 Backed out 15 changesets (bug 1500049, bug 1172394, bug 1546756, bug 1302379) for failures on browser_disabledForMediaStreamVideos.js. CLOSED TREE
Backed out changeset 355f090421a6 (bug 1500049)
Backed out changeset 306341d0b586 (bug 1302379)
Backed out changeset 3ff0d72d23a2 (bug 1546756)
Backed out changeset a4f256e68cef (bug 1172394)
Backed out changeset d0aa43657e8c (bug 1172394)
Backed out changeset edff95b6f724 (bug 1172394)
Backed out changeset 94bd21d9b396 (bug 1172394)
Backed out changeset 7e7baa73e1ef (bug 1172394)
Backed out changeset c3bd415507e8 (bug 1172394)
Backed out changeset 1c45b135318d (bug 1172394)
Backed out changeset c57c41e8c39e (bug 1172394)
Backed out changeset a796541fe5ef (bug 1172394)
Backed out changeset 89ad0b553b0f (bug 1172394)
Backed out changeset 744fb77a5833 (bug 1172394)
Backed out changeset afb4b226ff04 (bug 1172394)
2019-11-14 00:32:51 +02:00
Andreas Pehrson
4c3bf72271 Bug 1500049 - Wait for MediaCacheStreams to close properly before finishing MediaDecoder shutdown. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D52052

--HG--
extra : moz-landing-system : lando
2019-11-13 08:58:34 +00:00
Andrea Marchesini
f4c9f068fa Bug 1554847 - Improve cross-origin checks in canvas API - consider intermediate redirects, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D32792

--HG--
extra : moz-landing-system : lando
2019-06-04 06:32:37 +00:00
Coroiu Cristina
73edc6621b Backed out 4 changesets (bug 1554847) for wpt failures at /service-workers/service-worker/fetch-canvas-tainting-video-cache.https.html
Backed out changeset 17e36d139ac2 (bug 1554847)
Backed out changeset 101bd1c2d688 (bug 1554847)
Backed out changeset 3ff9a221f3e5 (bug 1554847)
Backed out changeset 946e4d9420dd (bug 1554847)
2019-06-04 03:24:42 +03:00
Andrea Marchesini
8df66534cf Bug 1554847 - Improve cross-origin checks in canvas API - consider intermediate redirects, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D32792

--HG--
extra : moz-landing-system : lando
2019-06-03 09:54:43 +00:00
Tarek Ziadé
c48befbb9c Bug 1542674 - Make Media debug info machine parsable r=padenot,smaug,jya
This patch structurizes the media debug information via webidl dictionaries
that are returned by HTMLMediaElement::GetMozRequestDebugInfo() and
MediaSource::GetMozDebugReaderData().

Differential Revision: https://phabricator.services.mozilla.com/D27893

--HG--
extra : moz-landing-system : lando
2019-05-27 16:15:33 +00:00
shindli
9134ad98fa Backed out changeset c386ebfd9c6b (bug 1542674) as per tarek's request on IRC 2019-05-07 15:07:27 +03:00
Tarek Ziadé
446d5cdff7 Bug 1542674 - Make Media debug info machine parsable r=padenot,smaug
This patch structurizes the media debug information via webidl dictionaries
that are returned by HTMLMediaElement::GetMozRequestDebugInfo() and
MediaSource::GetMozDebugReaderData().

Differential Revision: https://phabricator.services.mozilla.com/D27893

--HG--
extra : moz-landing-system : lando
2019-05-06 16:39:58 +00:00
dlee
9878ae650d Bug 1522412 - P2. Remove nsIChannel.LOAD_CLASSIFY_URI flag. r=Ehsan
nsIChannel.LOAD_CLASSIFY_URI is no longer required so we can remove it from
the codebase.
In the mean time, we add a new LOAD_BYPASS_URL_CLASSIFIER load flag for
channel creator to be able to force channel to bypass URL classifier check.
The use of the new LOAD_BYPASS_URL_CLASSIFIER flag will be addressed in
the other patches.

Differential Revision: https://phabricator.services.mozilla.com/D22111

--HG--
extra : moz-landing-system : lando
2019-03-25 12:47:57 +00:00
Gurzau Raul
2666e16a53 Backed out 7 changesets (bug 1522412) for xpcshell failures at test_shouldclassify.js on a CLOSED TREE.
Backed out changeset 7c998456e1fd (bug 1522412)
Backed out changeset ebb581ddf1d1 (bug 1522412)
Backed out changeset 850e1c68d978 (bug 1522412)
Backed out changeset fe288a48cecb (bug 1522412)
Backed out changeset 5399bca472b1 (bug 1522412)
Backed out changeset 91e5b339fe11 (bug 1522412)
Backed out changeset b80098d0a5c4 (bug 1522412)
2019-03-21 11:02:09 +02:00
Dimi Lee
8f1caf4049 Bug 1522412 - P2. Remove nsIChannel.LOAD_CLASSIFY_URI flag. r=Ehsan
nsIChannel.LOAD_CLASSIFY_URI is no longer required so we can remove it from
the codebase.
In the mean time, we add a new LOAD_BYPASS_URL_CLASSIFIER load flag for
channel creator to be able to force channel to bypass URL classifier check.
The use of the new LOAD_BYPASS_URL_CLASSIFIER flag will be addressed in
the other patches.

Differential Revision: https://phabricator.services.mozilla.com/D22111

--HG--
extra : moz-landing-system : lando
2019-03-21 07:30:51 +00:00
Sylvestre Ledru
4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Jonathan Kingston
f6680698bd Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-27 23:42:27 +00:00
Jonathan Kingston
c4853316e7 Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:31 +00:00
Jonathan Kingston
f7e35ae39e Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:04 +00:00
Dorel Luca
4a4dcd57fa Backed out 4 changesets (bug 1525319) for Android failures in dom/base/test/test_progress_events_for_gzip_data.html
Backed out changeset b73f033efb41 (bug 1525319)
Backed out changeset 1d318d5c6b98 (bug 1525319)
Backed out changeset 6d73418988d4 (bug 1525319)
Backed out changeset 84ca79bd2dc3 (bug 1525319)
2019-02-25 04:06:11 +02:00
Jonathan Kingston
63ab2bd8aa Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-24 20:27:55 +00:00
Jonathan Kingston
332531fa9c Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:59 +00:00
Jonathan Kingston
2441197975 Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:16 +00:00
Christoph Kerschbaumer
54df1cb98c Bug 1528677: Remove nullchecks for loadinfo since we have loadinfo on all channels. r=baku 2019-02-20 13:27:25 +01:00
Jonathan Kingston
3421b8fcff Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin
Replacing js and text occurences of asyncOpen2
Replacing open2 with open

Differential Revision: https://phabricator.services.mozilla.com/D16885

--HG--
rename : layout/style/test/test_asyncopen2.html => layout/style/test/test_asyncopen.html
extra : moz-landing-system : lando
2019-02-12 16:08:25 +00:00
Andrea Marchesini
a7033b2822 Bug 1515658 - ChannelMediaResource should use the BlobURLs' length when known, r=jya 2019-01-03 19:22:49 +01:00
Sylvestre Ledru
804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

Differential Revision: https://phabricator.services.mozilla.com/D12251

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
Jean-Yves Avenard
756a7bdfd8 Bug 1473173 - Report MediaResource as seekable if we know we will never seek into underlying transport. r=bryce
The MediaCache reads content by block of BLOCK_SIZE bytes (currently 32kB). As such, if a content being fetched is less than BLOCK_SIZE, it will always be fully read from offset = 0. We can then seek within this buffered content regardless of the underlying HTTP connection supporting request-range or not.

test_bug686942.html is ultimately testing a racy behaviour: it attempts to seek into a resource that isn't always seekable (http.js doesn't report Range -Request support for small files). The seekable range becomes then the buffered range which at the time of loadedmetadata may not be set yet.

Differential Revision: https://phabricator.services.mozilla.com/D3028

--HG--
extra : moz-landing-system : lando
2018-08-09 19:53:07 +00:00
Kershaw Chang
75e99128d4 Bug 1152162 - Correct parsing Accept-Range header, r=valentin
Since the syntax of Accept-Range is a comma-separated list of tokens, we need to check each token to see if it's equal to "bytes".
This patch simply use nsHttp::FindToken to find the token "bytes".

--HG--
extra : rebase_source : d1a0aa4dcfad038c23d6a848cffded6f8c559864
2018-08-07 06:03:00 +03:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Jean-Yves Avenard
15d6ce1610 Bug 1450607 - P3. Remove unused argument. r=gerald
MozReview-Commit-ID: 6NU9BLJi6kl

--HG--
extra : rebase_source : a9fca396ca5c353be979196dde4b1b02137cc9ca
2018-05-24 17:38:02 +02:00
Jean-Yves Avenard
f1f3bc2758 Bug 1450607 - P2. Synchronously seek to prepare for resuming following stop request. r=gerald
Bug 1415090 attempted to remove the need to access from the MediaResource members of MediaCacheStream from the main thread.
However, by doing so the logic flow for resuming the channel changed from a synchronous access to an asynchronous one.
This changed some assumptions and allowed the ChannelMediaResource to be used before the Seek call completed.

For now, re-add a cross thread access to the MediaCacheStream. A more elegant fix will be worked on in bug 1464045

MozReview-Commit-ID: 2xBTjDEqrkI

--HG--
extra : rebase_source : 0aa3cfcb8371d5147cbed746d9200dd22df4821b
2018-05-24 14:36:58 +02:00
Chris Pearce
a19e516c04 Bug 1443942 - Ensure MediaCacheStreams are initialized with the length of the resource, not the length of the byte range response. r=jya
I'm seeing intermittent failures of test_midflight_redirect_blocked. In this
test, our custom server responds to Firefox's 0- HTTP Byte Range request with a
[0,200] response. When Firefox requests 200-, the server responds with a cross
origin redirect, and then the remainder of the resource.

However sometimes while running test_midflight_redirect_blocked the MP4 demuxer
reads through all 200 bytes while trying to parse metadata before the redirect
has occurred and fed more data into the cache, and so the demuxer thinks it's
hit end of stream, and reports a failure. The demuxer thinks it's hit end of
stream, because we initialize the MediaCacheStream length in
ChannelMediaResource::Open() with the value of the Content-Length HTTP header.
But in an HTTP byte range response, the Content-Length header tells you the
length of the range returned, not the length of the entire resource. The length
of the resource is in the Content-Range header, we need to use that if
available.

So to fix this intermittent test failure, we need to also parse the
Content-Range header in ChannelMediaResource::Open(), and use the length from
that if available.

MozReview-Commit-ID: 29pPRsUvxag

--HG--
extra : rebase_source : ba1ef03d65ebd22698a29d8385f36b4c747ccf43
2018-04-04 12:36:00 +12:00
Chris Pearce
259a33e836 Bug 1443942 - Block mid-flight redirects to cross origin destinations during media loads. r=jya
There's no compelling use case for mid-flight redirects, and Chrome
already blocks it, so there's little point in maintaining it.

Add a hidden pref to toggle blocking, so we can toggle it off during
testing to ensure that we're blocking a working mid-flight redirect.

MozReview-Commit-ID: EnGNmYFr8Uv

--HG--
extra : rebase_source : a2f4b7c68b73ecc4c7525d4e41e834f4caf85707
2018-03-06 09:55:03 +13:00
Andrea Marchesini
c6da271117 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug
* * *
Bug 1425458 - Resource timing entries Workers - part 10 - Correct parameters in NS_NewChannel in nsDataObj.cpp, r=me
2018-01-24 17:17:31 +01:00
Brindusan Cristian
368c3d5b6b Backed out 12 changesets (bug 1425458) for mochitest failures on WorkerPrivate.cpp on a CLOSED TREE
Backed out changeset 11997de13778 (bug 1425458)
Backed out changeset 100b9d4f36bc (bug 1425458)
Backed out changeset a29e9dbb8c42 (bug 1425458)
Backed out changeset b96d58fd945c (bug 1425458)
Backed out changeset f140da44ba68 (bug 1425458)
Backed out changeset af56400233d9 (bug 1425458)
Backed out changeset 7034af4332e4 (bug 1425458)
Backed out changeset f70500179140 (bug 1425458)
Backed out changeset 793bbfc23257 (bug 1425458)
Backed out changeset 2efb375a8ffc (bug 1425458)
Backed out changeset 07e781e37451 (bug 1425458)
Backed out changeset e875f3702a5f (bug 1425458)
2018-01-24 20:47:48 +02:00
Andrea Marchesini
6480b95ba3 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug 2018-01-24 17:17:31 +01:00
JW Wang
51a137168e Bug 1427699. P2 - rewrite InitAsCloneInternal() to mimic the case where data is downloaded from a channel. r=gerald
Note we add mClient->CacheClientSuspend() so the network state of the element
is changed to IDLE because we have no channel to fetch data initially.

MozReview-Commit-ID: DgJbMxvJBzH

--HG--
extra : rebase_source : 69a3ef35d4b5faaaa645fabe02246d49aebce22e
extra : source : 61ec40ce378a444ec0f74d474c28b6a9db3aa830
2018-01-05 16:31:39 +08:00
JW Wang
6c7aec249a Bug 1427699. P1 - allow element->DownloadSuspended() to be called when mChannel is null. r=gerald
This is required by P2 where we want to notify the 'suspend' event for a cloned
resource whose mChannel is initially null.

MozReview-Commit-ID: 3znDl2TqlqK

--HG--
extra : rebase_source : 71c3d6dc2052566b6bfb0879ce56b804312c5a37
extra : source : e6b7cb7937c80420ad2725c5a77143c7a071150f
2018-01-05 16:04:16 +08:00
JW Wang
e43ca27ba0 Bug 1426578. P3 - make MediaCacheStream::InitAsClone() infallible. r=bechen,gerald
It must be infallible for there is no way to propagate the error back to the
main thread when part of the init functions run on another thread. It is OK to
clone a stream that ends abnormally as long as we don't copy the error status
of EOS. The cloned stream will open a new channel when necessary.

Note we also copy the partial block from the original stream to get as much
data as possible and thus reducing the chance of reopening the channel.

MozReview-Commit-ID: 37iYQonFdBU

--HG--
extra : rebase_source : 6bb9983bc8d1f2675557a14acf1824dba4a98fff
extra : intermediate-source : a20ff9a873db93c85750bb2af5bf05c27c9da3c3
extra : source : 0763fb0e7b4ed1096e406dadccb3ca698f39b207
2017-12-16 23:50:07 +08:00
JW Wang
0c88150fb7 Bug 1426578. P1 - tweak the constructor and init functions of ChannelMediaResource/MediaCacheStream. r=bechen,gerald
We want to init as many members as possible before taking the cache monitor.
This makes it easier to move part of the init functions to another thread.

MozReview-Commit-ID: 6mmO356nCyQ

--HG--
extra : rebase_source : 0e5093e01227e2008200cc1fa02aaac445833614
extra : intermediate-source : 2a6bf63954734d0c6470b425a9a8a77f8a805dc3
extra : source : 782ebf089ec17570650ce1635a591c3a9838d7a3
2017-12-14 16:08:17 +08:00
JW Wang
32de19ef80 Bug 1426061. P1 - always access MediaCacheStream::mClosed while holding the lock. r=bechen,gerald
We will offload MediaCacheStream::Close() to another thread and need to access
mClosed off the main thread.

MozReview-Commit-ID: 891rzC8dOON

--HG--
extra : rebase_source : 5cf18c4cdfe32dcc1894d5849b74a16582dcde51
extra : intermediate-source : 77febb3f2ca53cd5bb4834b110a4ff44a21556b0
extra : source : b4513de1038e6413477d09ef531f076ecb3955b3
2017-12-14 16:22:53 +08:00
JW Wang
37e466a4bf Bug 1426056. P2 - remove unused members. r=bechen,gerald
MozReview-Commit-ID: 6CjxrFzutkP

--HG--
extra : rebase_source : b9c9a858e08ea0aa35c074ac7734d62b1d8fe219
extra : intermediate-source : ce131c8c66ef1dc89c69fd0e2332b838419a3cc3
extra : source : e6ece8e702100d23540caf9fbcfea561dcb3e172
2017-12-07 15:45:15 +08:00
JW Wang
313522ae1f Bug 1426056. P1 - move the decision of resuming download to another thread. r=bechen,gerald
So we won't access mStreamLength/mChannelOffset (which are protected by the
cache monitor) on the main thread.

MozReview-Commit-ID: 2pKEttZOfB9

--HG--
extra : rebase_source : a683d7297e241f2aeaf60ba9ad558763d17ee094
extra : intermediate-source : 0a6c10e10d1e558b19799b720935bbdaa56728bf
extra : source : 282de2a9189e5e05f5f817174ebcffe1b592bb1a
2017-12-07 15:43:36 +08:00
JW Wang
d764d94fc5 Bug 1425170. P1 - add a member to ChannelMediaResource to store the nsIPrincipal. r=bechen,gerald
Note SharedInfo contains an array to store the original and cloned resources.
This allows us to iterate over resources on the main thread without taking the
cache monitor.

MozReview-Commit-ID: K3gcPYbf72Z

--HG--
extra : rebase_source : eaa070a889797c29d2599b4c3d2507f440d476e7
extra : source : 5dc420815d7a26771c176cdc7b6a87a1c2278da8
2017-12-08 11:08:38 +08:00
JW Wang
bb45ff010e Bug 1424973. P1 - propagate 'IsLiveStream' changes to MDSM in MediaDecoder subclasses. r=bechen,gerald
MozReview-Commit-ID: 8wSZf7pRERP

--HG--
extra : rebase_source : c2bea725064f5ad2e1cd1de1b8b9c19994bad89b
extra : intermediate-source : 54da627350d8a6276f9ad5d14a7191cb05957901
extra : source : dc582401401272df3150fb639bdf0ad05d749a06
2017-12-06 16:00:20 +08:00
JW Wang
381f8f5795 Bug 1423482 - ChannelMediaResource::CacheClientNotifyDataReceived() should use mCallback->AbstractMainThread() to dispatch tasks. r=bechen
To be consistent with other functions.

MozReview-Commit-ID: 1adZkXx2VkB

--HG--
extra : rebase_source : b7c420c717ffc95feb73749305fd25e3bba12ae1
extra : intermediate-source : a7a9f6ae0a0291c76f2eee0e89f57684df98a061
extra : source : 9055561c3203e06c0e2d6d0daaa76f3e85dc1b2c
2017-12-06 16:01:12 +08:00
JW Wang
32ec06ebb2 Bug 1422657. P2 - remove unused mDecoderPosition and related code. r=bechen,gerald
MozReview-Commit-ID: 8RobmJKC40i

--HG--
extra : rebase_source : 2b9abaa1a22b78cadbbdbf99d1c778fe82f84eac
extra : source : 7267883c2b722f806fc11c35ff9c8c5743a57bf3
2017-12-01 14:02:44 +08:00
Gerald Squelart
c5aeab4f69 Bug 1407810 - Use DDMOZ_LOG in media stack - r=jwwang
Mostly-mechanical replacement of MOZ_LOG with DDMOZ_LOG, usually just removing
the class name and `this` pointer (as they are already implicitly recorded).
Some files needed a bit more work when logging was done from helper classes or
static functions.

MozReview-Commit-ID: IeJJmzYqWMQ

--HG--
extra : rebase_source : 94200838dcdaf6c3bda9de30042ce2d307237eef
2017-10-13 16:31:59 +11:00
Narcis Beleuzu
bc723a6e7e Backed out 2 changesets (bug 1422657) for browser chrome failures on browser_cache.js r=backout on a CLOSED TREE
Backed out changeset 7267883c2b72 (bug 1422657)
Backed out changeset 9c77dddb2fac (bug 1422657)
2017-12-06 00:40:16 +02:00