This commit wires up `StorageSyncArea::teardown()` to call the new
`webext_storage::Store::close()` method.
It also changes `teardown` to drop the `LazyStore`, and thus close its
database connection, on the main thread if dispatching to the task
queue fails. Dispatch should only fail at shutdown, and putting the
owned reference back only adds indirection, since the `StorageSyncArea`
will still drop its `LazyStore` later in shutdown.
Finally, it includes an xpcshell test fix for
https://github.com/mozilla/application-services/pull/3050.
Differential Revision: https://phabricator.services.mozilla.com/D72992
Now that `BridgedEngine` has been moved to `sync15_traits`, we can
remove `golden_gate_traits` from the tree, and change Golden Gate to
depend on `sync15_traits` directly.
This commit also adds a Cargo feature, `services_sync`, which reflects
the `MOZ_SERVICES_SYNC` config option. In the future, we'll use this
feature to gate implementations of `mozIBridgedSyncEngine`.
Differential Revision: https://phabricator.services.mozilla.com/D72784
The `webext_storage_bridge` crate introduced in this commit bridges the
`mozIExtensionStorageArea` XPCOM interface to the `webext_storage` Rust
component from Application Services.
This commit factors out the following parts from bug 1623245, so that
we can land them piecemeal:
* The `mozIExtensionStorageArea` interfaces, which implement all the
methods needed to support the `storage.sync` API.
* A Rust implementation of the above, in `StorageSyncArea`.
* A `StorageTask` type, for dispatching storage operations to a
background task queue.
* A `LazyStore`, which wraps the Rust component's `Store` and lazily
initializes it on the background queue the first time it's used.
* A `StorageSyncService`, which is our singleton. It holds on to a
configured `StorageSyncArea`, and hands out references to it via
`getInterface`. Eventually, we'll extend this to support syncing,
too.
Differential Revision: https://phabricator.services.mozilla.com/D71897
Hooray, our first Application Services Rust component! This is a
mechanical run of `mach vendor rust`, split out into its own commit
to make reviewing the Firefox bindings easier.
Differential Revision: https://phabricator.services.mozilla.com/D71895
The `webext_storage_bridge` crate introduced in this commit bridges the
`mozIExtensionStorageArea` XPCOM interface to the `webext_storage` Rust
component from Application Services.
This commit factors out the following parts from bug 1623245, so that
we can land them piecemeal:
* The `mozIExtensionStorageArea` interfaces, which implement all the
methods needed to support the `storage.sync` API.
* A Rust implementation of the above, in `StorageSyncArea`.
* A `StorageTask` type, for dispatching storage operations to a
background task queue.
* A `LazyStore`, which wraps the Rust component's `Store` and lazily
initializes it on the background queue the first time it's used.
* A `StorageSyncService`, which is our singleton. It holds on to a
configured `StorageSyncArea`, and hands out references to it via
`getInterface`. Eventually, we'll extend this to support syncing,
too.
Differential Revision: https://phabricator.services.mozilla.com/D71897
Hooray, our first Application Services Rust component! This is a
mechanical run of `mach vendor rust`, split out into its own commit
to make reviewing the Firefox bindings easier.
Differential Revision: https://phabricator.services.mozilla.com/D71895
A first Rust test, which should run without any interaction with
Firefox.
This will eventually break down when we get IPC in there.
Depends on D72128
Differential Revision: https://phabricator.services.mozilla.com/D72385
A first Rust test, which should run without any interaction with
Firefox.
This will eventually break down when we get IPC in there.
Differential Revision: https://phabricator.services.mozilla.com/D72385
Pick commits:
- ea9e5aa: Implement a API to get `groupd_id` with special case handling (#69)
- d67d4d2: Revise prepush when deleting branch (#76)
- e5b0f97: Stop test immediately when error happens (#77)
- 98e59e5: Migrate from travis-ci.org to travis-ci.com
Differential Revision: https://phabricator.services.mozilla.com/D69647
--HG--
extra : moz-landing-system : lando
Pick commits:
- 432259a: Run `cargo fmt`
- c9f0499: Revert `derive(Debug)` removal (#75)
- f9abca8: Replace the custom input linear buffer by something based on ringbuf. (#74)
- 4eafcc8: Fix the resampler-calling code to use the correct semantic (#71)
- 828efbc: Merge pull request #72 from ChunMinChang/rm-debug-trait
Differential Revision: https://phabricator.services.mozilla.com/D69250
--HG--
extra : moz-landing-system : lando
This also upgrades the vendored Glean version, which thanks to our
upstream work doesn't change anything else (except one small
Mozilla-developed dependency)
It's still feature-gated to nightly.
In C++ there's now a `MOZ_GLEAN` define.
For Rust it's behind the `glean` feature (enabled on nightly only).
The `fog` crate is empty, so no Glean is actually instantiated.
Differential Revision: https://phabricator.services.mozilla.com/D68539
--HG--
rename : third_party/rust/glean-preview/src/metrics/mod.rs => toolkit/components/glean/src/lib.rs
extra : moz-landing-system : lando
This also upgrades the vendored Glean version, which thanks to our
upstream work doesn't change anything else (except one small
Mozilla-developed dependency)
It's still feature-gated to nightly.
In C++ there's now a `MOZ_GLEAN` define.
For Rust it's behind the `glean` feature (enabled on nightly only).
The `fog` crate is empty, so no Glean is actually instantiated.
Differential Revision: https://phabricator.services.mozilla.com/D68539
--HG--
rename : third_party/rust/glean-preview/src/metrics/mod.rs => toolkit/components/glean/src/lib.rs
extra : moz-landing-system : lando
Pick commits
- 20daa86: Revise git hooks (#68)
- 81d0024: Revise `destroy_cubeb_device_info` (#67)
- 1cc8a31: Add a hook to check that commits are formatted and linted correctly (#66)
- aa80b3f: Try using the model id as group id. (#64)
- ab31978: Bail if `cargo clippy` or `cargo fmt` fails (#65)
- 3860bb3: Fix comments in #57 (#63)
- ef5f58b: Run `cargo fmt` and make scripts executable (#62)
- a4c83db: Fix two bugs and add logs (#57)
Differential Revision: https://phabricator.services.mozilla.com/D68402
--HG--
extra : moz-landing-system : lando