This requires --build-peers-said-large-imports-were-ok since
third_party/rust/mp4parse/src/lib.rs is 113KB. This code is just moving from
media/mp4parse-rust to third_party/rust, so it's not really adding to net code
size.
Differential Revision: https://phabricator.services.mozilla.com/D74488
This commit adds syncing support to the `StorageSyncArea` class, via
the Golden Gate library.
It also changes the `BridgedEngine` trait: `initialize` and `finalize`
haven't been useful in practice, since that's managed by the storage
service, and the `LazyStore` takes care of setting up the storage
connection on first use. But, what we do need is a way to signal a
sync is starting, so that the engine can set up temp tables. That's
handled by the new `sync_started`.
Finally, this commit changes `BridgedEngine::set_uploaded` to take a
`sync15_traits::Guid` instead of a `String`.
Differential Revision: https://phabricator.services.mozilla.com/D73415
This commit splits `CryptoWrapper` into a base `RawCryptoWrapper`
class, which only handles encryption and decryption without
parsing the cleartext's contents, and the existing `CryptoWrapper`
class, which works like before.
Our bridged engine subclasses `RawCryptoWrapper`, and
implements some methods to convert records to and from envelopes.
Envelopes are a concept we introduced in `sync15_traits` to pass
along metadata from the BSO wrapper (like the modified time from the
server, and ID, to ensure they match) in addition to the cleartext.
This lets us reuse `sync15_traits::Payload` to parse record payloads
in Rust, and avoids parsing the cleartext in JS, only to stringify it
again when we pass it to the bridged Rust engine.
Differential Revision: https://phabricator.services.mozilla.com/D73581
This commit removes the `nsICancelable` return values from all
`mozIBridgedSyncEngine` methods, and replaces them with a
`mozIInterruptible` interface that can be implemented by store
classes that support interrupting.
The `nsICancelable` pattern was intended to make each operation
interruptible, without affecting the others. But we can't guarantee
that with SQLite, because it only has a way to interrupt all
running statements on a connection, not specific ones. Further,
this pattern doesn't match what we currently do in a-s, where we
create an internal "interrupt scope" for each operation, and hand
out an "interrupt handle" for interrupting all in-progress
operations.
Storage classes like `StorageSyncArea` can opt in to interruption
by implementing `mozIInterruptible`. It's a separate interface to
protect against accidental misuse: because it interrupts all
statements on the connection, it might lose writes if the current
operation is a `set`, for example. But it's useful for testing and
debugging, so we still expose it.
This commit also changes Golden Gate ferries to hold weak references to
the `BridgedEngine`, so that they don't block teardown.
Differential Revision: https://phabricator.services.mozilla.com/D73413
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
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
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
There is no need to use the Git repository, its only change compared to 0.1.6
is that some random tidbit has been fixed in the README file.
Depends on D69805
Differential Revision: https://phabricator.services.mozilla.com/D69806
--HG--
extra : moz-landing-system : lando
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
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
This pulls a new bindgen version and so on.
See last patch of this bug for the relevant third_party/ code changes.
Differential Revision: https://phabricator.services.mozilla.com/D66280
--HG--
extra : moz-landing-system : lando