gecko-dev/devtools/shared
Nicolas Chevobbe 047f13303a Bug 1510422 - Fix autocomplete cache handling; r=Honza.
In Bug 1462394, we moved the autocomplete data handling
out of the JsTerm to the Redux store. In the process, we
regress some cases like `await n`, which should display
`navigator`, but isn't anymore when the user types the
whole sequence. Ctrl+Space would still show the popup,
which indicates that the issue is not on the server-side.

This issue is caused because our new code decides that
we should hit the cache when typing the `n`, and there's
nothing in the cache.

Previously, we were clearing the cache as soon as the input
last string wasn't alphanumeric, which we don't anymore.
To fix that, instead of relying on the last string of the
input (which could be wrong in cases like `x.["hello `), we
clear the cache when the autocomplete service returns a null
`matches` property.

In the JsPropertyProvider, we use to return null whenever
there isn't any search done (incorrect input, empty match prop, …).
So it seems like a good idea to bust the cache when the
server returns null.

This requires some changes to the autocomplete service, as well
as some in jsPropertyProvider (e.g. to handle `await `).

Tests are added both on the client and the frontend to make sure
we don't regress this (those tests fail without the actual fix).

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

--HG--
extra : moz-landing-system : lando
2018-11-29 13:58:57 +00:00
..
acorn Bug 1434374 - Auto-rewrite Cu.import into ChromeUtils.import or require calls. r=jdescottes 2018-02-07 01:37:36 -08:00
adb Bug 1492700 - Migrate AdbRuntime to a class;r=daisuke 2018-11-27 12:53:26 +00:00
client Bug 1509315 - Pass the full target form to all BrowsingContextTargetFront instances. r=yulia 2018-11-27 21:47:52 +00:00
css Bug 1506547 - Align user-select behavior more with other UAs. r=mats 2018-11-26 09:21:37 +00:00
discovery Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
fronts Bug 1506546 - Use protocol.js to fetch WebExtension target actor. r=yulia 2018-11-27 19:16:51 +00:00
heapsnapshot Bug 1508472 - Part 1: First batch of comment fix-ups in preparation for the tree reformat r=sylvestre 2018-11-27 10:08:58 +00:00
inspector Bug 1499049 - (Part 1) Log ancestor rule tree for changes to CSS declarations; r=pbro 2018-10-24 17:43:33 +00:00
jsbeautify Bug 1434374 - Auto-rewrite Cu.import into ChromeUtils.import or require calls. r=jdescottes 2018-02-07 01:37:36 -08:00
layout Bug 1499630 - Text nodes that are flex items aren't highlighted correctly in the flexbox highlighter when they wrap r=gl 2018-11-21 14:20:30 +00:00
locales Bug 1505848 - switch from CSS based approach to calculating contrast to canvas one, that also handles gradients and images. r=jdescottes,pbro 2018-11-16 03:59:08 +00:00
node-properties
performance Bug 1489745 - Convert the preference sample-frequency-khz to hz r=ochameau,mstange 2018-10-24 12:09:37 +00:00
performance-new Bug 1476775 - Part 2: Change the profiler usage in devtools after API change r=julienw,gregtatum 2018-11-23 16:10:08 +00:00
platform Bug 1493292 - Remove aDataLen parameters from nsITransferable.getTransferData. r=smaug 2018-11-20 16:59:56 +00:00
preferences Bug 1505172 - Remove references to devtools.debugger.forbid-certified-apps preference. r=jdescottes,jryans 2018-11-08 16:46:58 +00:00
pretty-fast Bug 1440094 - Remove imports to Console.jsm that only access the 'console' object;r=mossop 2018-02-27 11:29:59 -08:00
protocol Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
qrcode Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
screenshot Bug 1498143 - Pass nodeActorID to screenshot actor to enable feature in iframes and shadowroots;r=pbro,yulia 2018-11-19 13:27:51 +00:00
security Bug 1497448: Rename closeAllListener to closeAllSocketListeners. r=ochameau,jdescottes 2018-11-07 17:46:05 +00:00
sourcemap Bug 1452706 - Add the 'expected' arguments to throws/rejects for devtools/shared/sourcemap. r=yulia 2018-07-03 20:16:20 +01:00
specs Bug 1506546 - Use protocol.js to fetch WebExtension target actor. r=yulia 2018-11-27 19:16:51 +00:00
sprintfjs Bug 1406311 - sprintfjs: optimise string-format for %S patterns;r=bgrins 2017-10-17 21:11:48 +02:00
test-helpers Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
tests Bug 1497457 - Allow to remove one time listeners on event-source;r=ochameau 2018-11-27 10:13:47 +00:00
transport Bug 1497448: Rename closeAllListener to closeAllSocketListeners. r=ochameau,jdescottes 2018-11-07 17:46:05 +00:00
webconsole Bug 1510422 - Fix autocomplete cache handling; r=Honza. 2018-11-29 13:58:57 +00:00
worker Bug 1508287 - Ensure exposing `console` to modules loaded for worker server. r=yulia 2018-11-22 15:23:15 +00:00
.eslintrc.js
DevToolsUtils.js Bug 1505393 - Add better handling of unsafe getters in JsPropertyProvider; r=bgrins. 2018-11-08 15:47:53 +00:00
Loader.jsm Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
Parser.jsm Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
ThreadSafeDevToolsUtils.js Bug 1454696 - Run eslint --fix for prefer-const;r=yulia 2018-06-01 12:36:09 +02:00
async-storage.js Bug 1454696 - Run eslint --fix for prefer-const;r=yulia 2018-06-01 12:36:09 +02:00
async-utils.js Bug 1454696 - Run eslint --fix for prefer-const;r=yulia 2018-06-01 12:36:09 +02:00
base-loader.js Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
builtin-modules.js Bug 1508297 - Expose DOMRect to DevTools modules r=gl 2018-11-19 21:15:44 +00:00
content-observer.js Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
debounce.js Bug 1454696 - Run eslint --fix for prefer-const;r=yulia 2018-06-01 12:36:09 +02:00
defer.js Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
deprecated-sync-thenables.js Bug 1434374 - Always import deprecated-sync-promises as a module. r=jdescottes 2018-02-05 08:11:30 -08:00
dom-node-constants.js Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
dom-node-filter-constants.js Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
event-emitter.js Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
extend.js Bug 1443081 - Apply spacing via `eslint --fix` for DevTools. r=jdescottes 2018-03-12 13:44:41 -05:00
flags.js Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
generate-uuid.js
indentation.js Bug 1454696 - Run eslint --fix for prefer-const;r=yulia 2018-06-01 12:36:09 +02:00
indexed-db.js Bug 1454696 - Run eslint --fix for prefer-const;r=yulia 2018-06-01 12:36:09 +02:00
jar.mn Bug 863246 - Move resources that need to be exposed to web content to locations that are marked as contentaccessible r=billm 2017-06-08 17:52:46 +08:00
l10n.js Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
loader-plugin-raw.jsm Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
moz.build Bug 1492700 - Move Devices.jsm to devtools/shared/adb folder;r=daisuke 2018-11-27 12:49:49 +00:00
path.js Bug 1454696 - Run eslint --fix for prefer-const;r=yulia 2018-06-01 12:36:09 +02:00
plural-form.js Bug 1441146 - Sync DevTools plural-form.js with intl/PluralForm.jsm r=jdescottes 2018-02-26 14:41:26 +01:00
protocol.js Bug 1507125 - Protocol Front should throw when called after destroy;r=ochameau 2018-11-29 10:00:06 +00:00
system.js Bug 1497449: Introduce deviceName into getSystemInfo(). r=jdescottes 2018-11-16 04:30:29 +00:00
task.js Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
throttle.js Bug 1454696 - Run eslint --fix for prefer-const;r=yulia 2018-06-01 12:36:09 +02:00
wasm-source-map.js Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00