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

29 Коммитов

Автор SHA1 Сообщение Дата
Valentin Gosu 5ac68030f7 Bug 1487100 - Allow calling nsICacheInfoChannel.preferAlternativeDataType(altDataType, contentType) multiple times r=michal,luke
This patch changes the way we set and handle the preferred alternate data type.
It is no longer just one choice, but a set of preferences, each conditional
on the contentType of the resource.

For example:
  var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
  cc.preferAlternativeDataType("js-bytecode", "text/javascript");
  cc.preferAlternativeDataType("ammended-text", "text/plain");
  cc.preferAlternativeDataType("something-else", "");

When loaded from the cache, the available alt-data type will be checked against
"js-bytecode" if the contentType is "text/javascript", "ammended-text" if the contentType is "text/plain" or "something-else" for all contentTypes.
Note that the alt-data type could be "something-else" even if the contentType is "text/javascript".

The preferences are saved as an nsTArray<mozilla::Tuple<nsCString, nsCString>>.

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

--HG--
extra : rebase_source : eb4961f05a52e557e7d2d986d59e0a2cf18a3447
extra : source : dd1c31ea78c2b15d14750d137037a54d50719997
2018-10-17 13:58:30 +00:00
Dorel Luca 1a48c88d19 Backed out 2 changesets (bug 1487100) for XPCShell failures in netwerk/test/unit_ipc/test_alt-data_simple_wrap.js
Backed out changeset 7f9d03c29a6f (bug 1487100)
Backed out changeset dd1c31ea78c2 (bug 1487100)
2018-10-18 05:51:42 +03:00
Valentin Gosu e392dbc5dd Bug 1487100 - Allow calling nsICacheInfoChannel.preferAlternativeDataType(altDataType, contentType) multiple times r=michal,luke
This patch changes the way we set and handle the preferred alternate data type.
It is no longer just one choice, but a set of preferences, each conditional
on the contentType of the resource.

For example:
  var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
  cc.preferAlternativeDataType("js-bytecode", "text/javascript");
  cc.preferAlternativeDataType("ammended-text", "text/plain");
  cc.preferAlternativeDataType("something-else", "");

When loaded from the cache, the available alt-data type will be checked against
"js-bytecode" if the contentType is "text/javascript", "ammended-text" if the contentType is "text/plain" or "something-else" for all contentTypes.
Note that the alt-data type could be "something-else" even if the contentType is "text/javascript".

The preferences are saved as an nsTArray<mozilla::Tuple<nsCString, nsCString>>.

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

--HG--
extra : moz-landing-system : lando
2018-10-17 13:58:30 +00:00
Michal Novotny ee8f43208a Bug 1448476 - Cache entry corruption after writing the alternate data. r=honzab
When writing to alt-data output stream fails for whatever reason, we now try to
truncate alternative data and keep the original data instead of dooming the
whole entry. The patch also changes how is the predicted size passed to the
cache. Instead of a dedicated method it's now an argument of openOutputStream
and openAlternativeOutputStream methods which fail in case the entry would
exceed the allowed limit.
2018-04-25 07:01:00 +03:00
Honza Bambas 3fa9ca21fd Bug 1416682 - Add nsICacheEntry.drop() to explicitly release HTTP cache entries from channels to avoid logical deadlocks, r=michal 2017-11-30 12:03:00 +02:00
Ho-Pang Hsu f56a0fb03f Bug 1395202 - Part 1: Create nsICacheEntry::CacheEntryId. r=michal, f=junior,mayhemer 2017-10-10 04:09:00 -04:00
Sebastian Hengst 99c7358944 Backed out changeset 0e5484914609 (bug 1395202) for build bustage at netwerk/protocol/http/HttpChannelParent.cpp:1523: 'class mozilla::net::HttpBaseChannel' has no member named 'GetCacheEntryId'. r=backout on a CLOSED TREE 2017-10-10 15:43:13 +02:00
Ho-Pang Hsu 432321ac7c Bug 1395202 - Part 1: Create nsICacheEntry::CacheEntryId. r=michal, f=junior,mayhemer 2017-10-10 04:09:00 -04:00
Junior Hsu 6d4fca1d99 Bug 1325088 - Part 2: Expose the index-update to cache entry. r=michal
--HG--
extra : rebase_source : 8c8eaf6cea7eb3491de4cdf9dbe9783491296130
2017-03-28 12:02:45 +08:00
Tim Huang 0764c9c895 Bug 1312954 - Part 4: Add a new function in nsICacheEntry to allow its loadInfoContext to be fetched. r=mayhemer 2017-02-02 22:15:00 -05:00
Valentin Gosu 3c75088cde Bug 1313095 - Add telemetry to measure if cache loads are faster than network loads r=michal
MozReview-Commit-ID: C6kMSPw8gxv
* * *
[mq]: bug1313095-telemetry-reval.patch

MozReview-Commit-ID: 8jwMgq0cx3Z
2016-11-10 16:14:34 +01:00
Valentin Gosu 29eff7dfe4 Bug 1231565 - (Part 3) Make alt-data responses report the correct content length r=michal
MozReview-Commit-ID: DvQP7NB4SqW
2016-09-27 10:26:00 +02:00
Valentin Gosu 76d2cd8b5d Bug 1231565 - (Part 2) Allow storing alternate data in the HTTP cache r=honzab
* Add PAltDataOutputStream.ipdl to be able to open an OutputStream to the cache entry in the child process
* AltDataOutputStreamChild/Parent are Main Thread only for now.
* Adds methods for reading and writing alt-data to nsICacheInfoChannel.idl
* Keep a ref of the cache entry after OnStopRequest in case the consumer tries to open the alt-data output stream

MozReview-Commit-ID: jlraDI97Hg
2016-04-11 05:17:02 +02:00
Michael Layzell eea03e9e4d Bug 1293364 - Refactor out duplicate typedefs in xpidl, r=mayhemer
MozReview-Commit-ID: 6lJxrqqBTk8
2016-08-10 11:11:42 -04:00
Nicholas Hurley fd7a5d97b5 Bug 1016628 - Add prefetch abilities to the predictor. r=mayhemer 2016-04-21 12:32:30 -07:00
Jeremy Poulin 890b61b742 Bug 1020416 - Added forceValidFor() and isForcedValid attribute to nsICacheEntry. r=honzab, michal 2014-07-21 11:34:17 -07:00
Brad Lassey d801604520 back out bug 1020416 for causing hangs on Firefox for Android 2014-07-25 13:21:42 -04:00
Jeremy Poulin 0cce7ce188 Bug 1020416 - Added forceValidFor() and isForcedValid attribute to nsICacheEntry. r=honzab, michal 2014-07-21 11:34:17 -07:00
Carsten "Tomcat" Book 82d02bf40a Backed out changeset a232fd36c827 (bug 1020416) for nightly startup crashed - bug 1041492 a=sheriffduty 2014-07-21 14:57:09 +02:00
Jeremy Poulin 21a95c5876 Bug 1020416 - Add forceValidFor() and isForcedValid attribute to nsICacheEntry. r=honzab, r=michal 2014-07-18 18:11:34 -07:00
Honza Bambas ec884e84a0 Bug 916052 - Adapt about:cache to the HTTP cache v2 API, r=michal+MattN 2014-05-01 13:28:12 +02:00
Honza Bambas fcfec4dbfa Backing out bug 916052 (2557b51a47a0) for build bustage on linux/osx, r=bustage on CLOSED TREE 2014-04-30 13:05:43 +02:00
Honza Bambas bbabececf4 Bug 916052 - Adapt about:cache to the HTTP cache v2 API, r=michal+MattN 2014-04-30 12:39:18 +02:00
Honza Bambas 918e3fdae3 Bug 959761 - finalize nsICacheEntry interface, r=michal 2014-04-04 14:42:05 +02:00
Michal Novotny d2d590bfc8 Bug 923016 - Implementation of cache index, r=honzab 2014-02-18 16:05:07 +01:00
Ed Morley 6088e9379c Backed out changeset f514ab5c4b5b (bug 923016) for B2G xpcshell crashes; CLOSED TREE 2014-03-05 17:25:27 +00:00
Michal Novotny a5234f73a3 Bug 923016 - Implementation of cache index, r=honzab 2014-02-18 16:05:07 +01:00
Honza Bambas eb9c03b9e5 Bug 949175 - Remove possibility to un-persist a cache entry after it has been opened, r=michal 2014-02-04 01:52:59 +01:00
Honza Bambas 894ba59236 Bug 913807 - HTTP cache v2: API+top service+integration+tests, off by default, r=michal+ehsan+mark.finkle+fabrice+mhammond+gavin 2013-09-20 11:11:25 +02:00