gecko-dev/netwerk
Daisuke Akatsuka a65bd31ef9 Bug 1572933: Introduce an attribute to raise the cache priority. r=pbro,mayhemer
For now, when we turn on `disable cache` switch in DevTools[1], web page loads
the contents without using the cache. Furthermore, DevTools as well comes to
load the contents DevTools inspects without using the cache. And, if the loaded
contents from the web page and DevTools was different, becomes impossible to
inspect the content correctly.
Thus, in order to make DevTools refer the same content the web page loaded,
makes DevTools load the contents inspecting from the cache at first, no matter
if disables the switch or not.

When turns on disable cache in DevTools, `LOAD_BYPASS_CACHE` flag is set into
`loadFlags` in the `docshell`.[2] The other hand, the content DevTools inspects
is loaded from a channel DevTools creates with `LOAD_FROM_CACHE` flag.[3]
However, because this channel is belong to same `loadGroup` of the `docshell`,
`LOAD_BYPASS_CACHE` is inherited and is choosen even if `LOAD_FROM_CACHE` is set.
Thus, in this patch, we introduce an attribute `preferCacheLoadOverBypass`
which raises the priority for `LOAD_FROM_CACHE` above `LOAD_BYPASS_CACHE` and
`LOAD_BYPASS_LOCAL_CACHE`.

[1] https://developer.mozilla.org/en-US/docs/Tools/Settings#Advanced_settings
[2] https://searchfox.org/mozilla-central/source/devtools/server/actors/targets/browsing-context.js#1227
[3] https://searchfox.org/mozilla-central/source/devtools/shared/DevToolsUtils.js#542-544

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

--HG--
extra : moz-landing-system : lando
2019-09-09 00:57:05 +00:00
..
base Bug 1572933: Introduce an attribute to raise the cache priority. r=pbro,mayhemer 2019-09-09 00:57:05 +00:00
build Bug 1567616 - network id based on default gateway is wrong when VPN overrides default gateway by more specific routes r=dragana 2019-08-26 21:46:32 +00:00
cache Backed out changeset 8c25acd6a557 (bug 1237782) for wpt failures at controller-on-disconnect.https.html 2019-09-07 14:32:37 +03:00
cache2 Bug 1577354 - Assertion failure: decoded.CountChar('\t') == 2, at /netwerk/cache2/CacheFileContextEvictor.cpp:409, r=mayhemer 2019-09-02 17:26:08 +00:00
cookie Bug 1578037 - Disable tests that cause leaks on fission. r=johannh 2019-09-04 07:18:42 +03:00
dns No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM 2019-09-05 13:17:10 +00:00
ipc Bug 1572933: Introduce an attribute to raise the cache priority. r=pbro,mayhemer 2019-09-09 00:57:05 +00:00
locales Bug 1523249, r=valentin 2019-01-30 11:39:42 +00:00
mime Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
protocol Bug 1572933: Introduce an attribute to raise the cache priority. r=pbro,mayhemer 2019-09-09 00:57:05 +00:00
sctp Bug 1553789: Don't connect unless our transport is the one that is ready. r=mjf 2019-07-15 14:10:03 +00:00
socket Bug 1510569 - Implement serializers for nsITransportSecurityInfo, nsIX509Cert, and nsIX509CertList r=froydnj,keeler,mayhemer 2019-08-28 18:55:31 +00:00
srtp Bug 1479665: update libsrtp to bb0412ee84ebe3d2916b45b19de72fabb183d9db. r=bwc 2018-09-13 14:39:31 +00:00
streamconv Bug 1560574 - use FormatPRExplodedTime to display GMT; r=kershaw 2019-08-20 14:00:31 +00:00
system Bug 1570932 - Add telemetry about how often we observe network change events, r=dragana 2019-08-30 18:18:19 +00:00
test Backed out changeset 8c25acd6a557 (bug 1237782) for wpt failures at controller-on-disconnect.https.html 2019-09-07 14:32:37 +03:00
url-classifier Bug 1575811 - Remove |IsAllowListed| check in UrlClassifierCommon::AnnotateChannel. r=Ehsan 2019-08-28 13:40:33 +00:00
wifi Bug 1458624 - Firefox on Linux now sends signal strength to geolocation API as RSSI dBm instead of a percentage. r=cpeterson 2019-07-17 19:11:19 +00:00
moz.build Bug 1511436 - Cleanup URL-Classifier code - part 1 - nsIUrlClassifierFeature, r=dimi 2018-12-14 12:40:16 +01:00
necko-config.h.in