зеркало из https://github.com/mozilla/gecko-dev.git
a65bd31ef9
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 |
||
---|---|---|
.. | ||
base | ||
build | ||
cache | ||
cache2 | ||
cookie | ||
dns | ||
ipc | ||
locales | ||
mime | ||
protocol | ||
sctp | ||
socket | ||
srtp | ||
streamconv | ||
system | ||
test | ||
url-classifier | ||
wifi | ||
moz.build | ||
necko-config.h.in |