gecko-dev/devtools/shared
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
..
acorn Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
adb Bug 1543023 - Use ChromeUtils.import only with one argument in all /devtools/ r=jdescottes 2019-07-11 17:08:20 +00:00
client Bug 1578361 - removed unused localTransport getter on debugger-client r=ladybenko 2019-09-04 11:15:40 +00:00
css Bug 1568779 - Remove editors settings comments in devtools files. r=pbro. 2019-08-19 12:48:16 +00:00
discovery Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE 2019-07-05 11:29:32 +02:00
fronts Bug 1568840 - Use PageStyle from the currently selected element in the computed view. r=pbro,jdescottes 2019-09-06 08:12:46 +00:00
heapsnapshot Bug 1575569 - use GetSpecialSystemDirectory to avoid accessing the directory service off the main thread for worker snapshots, r=fitzgen 2019-08-21 22:18:44 +00:00
inspector Bug 1568779 - Remove editors settings comments in devtools files. r=pbro. 2019-08-19 12:48:16 +00:00
jsbeautify Bug 1568779 - Remove editors settings comments in devtools files. r=pbro. 2019-08-19 12:48:16 +00:00
layout Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE 2019-07-05 11:29:32 +02:00
locales Bug 1577759 - add highlighter support for a keyboard check for non-focusable non-semantic elements. r=rcaliman 2019-09-02 12:31:03 +00:00
node-properties
performance Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE 2019-07-05 11:29:32 +02:00
platform Bug 1568779 - Remove editors settings comments in devtools files. r=pbro. 2019-08-19 12:48:16 +00:00
protocol Backed out changeset 3182a1d6debb (bug 1500142) for xpcshell failures at test_oob_cert_auth.js. CLOSED TREE 2019-09-06 23:05:31 +03:00
qrcode Bug 1572390 - Split main.js in debugger-server and debugger-server-connection r=yulia,ochameau 2019-08-08 12:44:13 +00:00
screenshot Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE 2019-07-05 11:29:32 +02:00
security Bug 1568779 - Remove editors settings comments in devtools files. r=pbro. 2019-08-19 12:48:16 +00:00
specs Bug 1576318 Part 4 - Add testing method to get the debugger requests and associated stacks for the current pause, r=loganfsmyth. 2019-08-30 17:10:57 +00:00
sprintfjs
test-helpers Bug 1566457 - Remove unused provider logic from Loader.jsm. r=jdescottes 2019-07-18 12:25:05 +00:00
tests Bug 1568779 - Remove editors settings comments in devtools files. r=pbro. 2019-08-19 12:48:16 +00:00
transport Bug 1571466 - Cleanup unnecessary ESLint global definitions. r=mossop 2019-08-19 07:11:56 +00:00
webconsole Bug 1564221 - Remove QueryInterface parameter from MockSecurityInfo in devtools tests r=ochameau,nchevobbe 2019-08-20 21:38:34 +00:00
worker Bug 1543023 - Use ChromeUtils.import only with one argument in all /devtools/ r=jdescottes 2019-07-11 17:08:20 +00:00
.eslintrc.js
accessibility.js Bug 1568053 - Create node actor method for getting complex bg color data for text nodes and refactor existing contrast calculation methods, r=yzen,gl 2019-08-16 00:55:26 +00:00
async-storage.js Bug 1562642 - Part 5 - Add missing MPL2 headers in devtools/ r=jlast 2019-08-12 15:56:26 +00:00
async-utils.js
base-loader.js Bug 1571466 - Cleanup unnecessary ESLint global definitions. r=mossop 2019-08-19 07:11:56 +00:00
builtin-modules.js Bug 1574401 - allow DevTools to access BrowsingContext; r=ochameau 2019-09-02 13:24:20 +00:00
constants.js Bug 1577759 - add a keyboard check for non-focusable non-semantic elements that are interactive with mouse only. r=nchevobbe 2019-09-02 06:59:33 +00:00
content-observer.js Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE 2019-07-05 11:29:32 +02:00
debounce.js Backed out changeset 3c2a368a4c8b (bug 1552464) for xpcshell failures on test_rotate_viewport.js on a CLOSED TREE 2019-05-22 14:57:46 +03:00
defer.js Bug 1388054 - Stop using Promise.jsm from devtools/shared/defer. r=jryans 2019-07-14 19:46:32 -07:00
DevToolsUtils.js Bug 1572933: Introduce an attribute to raise the cache priority. r=pbro,mayhemer 2019-09-09 00:57:05 +00:00
dom-node-constants.js
dom-node-filter-constants.js Bug 1562642 - Part 5 - Add missing MPL2 headers in devtools/ r=jlast 2019-08-12 15:56:26 +00:00
event-emitter.js Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE 2019-07-05 11:29:32 +02:00
execution-point-utils.js Bug 1556813 Part 7 - Instrumentation based control logic, r=loganfsmyth. 2019-06-12 07:45:04 -10:00
extend.js
flags.js Bug 1562642 - Part 5 - Add missing MPL2 headers in devtools/ r=jlast 2019-08-12 15:56:26 +00:00
generate-uuid.js Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE 2019-07-05 11:29:32 +02:00
indentation.js Bug 1568779 - Remove editors settings comments in devtools files. r=pbro. 2019-08-19 12:48:16 +00:00
indexed-db.js Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb 2019-07-08 16:37:45 +00:00
jar.mn Bug 1572793 - Move webextension-fallback.html from devtools/client/jar.mn to devtools/shared/jar.mn. r=jdescottes 2019-08-19 06:30:56 +00:00
l10n.js Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE 2019-07-05 11:29:32 +02:00
loader-plugin-raw.jsm Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin 2019-02-12 16:08:25 +00:00
Loader.jsm Bug 1566457 - Remove unused provider logic from Loader.jsm. r=jdescottes 2019-07-18 12:25:05 +00:00
moz.build Bug 1577409 - Move natural-sort helper to fix Storage panel in remote debugging r=daisuke 2019-08-30 07:43:12 +00:00
natural-sort.js Bug 1577409 - Move natural-sort helper to fix Storage panel in remote debugging r=daisuke 2019-08-30 07:43:12 +00:00
path.js
plural-form.js Bug 1340971 - Use proper plural form in editor.searchResults and sourceSearch.resultsSummary1 r=davidwalsh,flod 2019-06-11 19:25:15 +00:00
protocol.js Bug 1560445 - Extract classes from protocol.js. r=yulia 2019-06-26 15:53:20 +00:00
service-workers-debug-helper.js Bug 1552945 - Send push events to ServiceWorkerRegistrationActor's active Service Worker r=jdescottes 2019-08-20 15:21:02 +00:00
system.js Bug 1572390 - Split main.js in debugger-server and debugger-server-connection r=yulia,ochameau 2019-08-08 12:44:13 +00:00
task.js Bug 1568779 - Remove editors settings comments in devtools files. r=pbro. 2019-08-19 12:48:16 +00:00
ThreadSafeDevToolsUtils.js Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE 2019-07-05 11:29:32 +02:00
throttle.js
wasm-source-map.js Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE 2019-07-05 11:29:32 +02:00
webextension-fallback.html Bug 1572793 - Move webextension-fallback.html from devtools/client/jar.mn to devtools/shared/jar.mn. r=jdescottes 2019-08-19 06:30:56 +00:00