Files
tubestation/browser/components/urlbar
Drew Willcoxon a452c2bc8f Bug 1895110 - Add a profileBeforeChange shutdown blocker to interrupt the Rust Suggest store. r=daisuke
This adds a `profileBeforeChange` async shutdown blocker that interrupts the
Suggest store. It calls `interrupt(InterruptKind.READ_WRITE)` so that both
ingests and queries are interrupted. The new `interrupt()` API is defined in
suggest.udl here:

https://searchfox.org/mozilla-central/rev/b11735b86bb4d416c918e2b2413456561beff50c/third_party/rust/suggest/src/suggest.udl#149-153

`InterruptKind` is defined in the generated UniFFI JS bindings here:

https://searchfox.org/mozilla-central/rev/b11735b86bb4d416c918e2b2413456561beff50c/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustSuggest.sys.mjs#1115-1119

This also modifies the one existing `interrupt()` call (when queries are
canceled) to pass `InterruptKind.READ`. According to the `interrupt()` doc,
passing nothing is deprecated.

I simplified the first task in test_rust_ingest.js. Now that Rust is enabled by
default, there's no need to test a first run where Rust starts out disabled but
then becomes enabled. Now the task only tests disabling it and then re-enabling
it. This also means Rust is enabled for the rest of the test, which makes the
test easier to work with.

Depends on D203824

Differential Revision: https://phabricator.services.mozilla.com/D214180
2024-06-21 06:44:02 +00:00
..