Граф коммитов

43 Коммитов

Автор SHA1 Сообщение Дата
Xidorn Quan 8799a09b16 Bug 1661961 - Upgrade cstr to 0.2.x. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D98839
2020-12-07 08:01:04 +00:00
Mark Hammond 6c3e1b850d Bug 1675190 - Vendor new application-services into mozilla-central. r=extension-reviewers,janerik,eoger,dmose,rpl
Differential Revision: https://phabricator.services.mozilla.com/D95829
2020-11-09 04:25:14 +00:00
smolnar 5957a1ba9c Backed out changeset a82a3d7cec03 (bug 1675190) for causing linux toolchains bustage. CLOSED TREE 2020-11-05 13:26:46 +02:00
Mark Hammond bcb7a913bb Bug 1675190 - Vendor new application-services into mozilla-central. r=extension-reviewers,janerik,eoger,dmose,rpl
Differential Revision: https://phabricator.services.mozilla.com/D95829
2020-11-05 03:50:21 +00:00
Mark Hammond 5c11945748 Bug 1669722 - vendor a new app-services, which includes ruslite 0.24.1. r=eoger
Differential Revision: https://phabricator.services.mozilla.com/D93004
2020-10-08 21:23:40 +00:00
Alexis Beingessner e5dd298d13 Bug 1654807 - update thin-vec to 0.2.1 for potential endianess fix. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87019
2020-09-14 17:32:40 +00:00
Luca Greco e4fa86648a Bug 1656947 - Vendor application-services to import fix on webext-storage component. r=markh
Differential Revision: https://phabricator.services.mozilla.com/D86487
2020-08-10 00:32:24 +00:00
lougeniac64 499048fe86 (Bug 1635487) Wired up sync logging for extension pref storage r=lina,markh
Differential Revision: https://phabricator.services.mozilla.com/D80975
2020-06-27 19:15:17 +00:00
Csoregi Natalia 5bb8a015e6 Backed out changeset 8cd7fabbe270 (bug 1635487) for multiple leaks. CLOSED TREE 2020-06-27 10:43:15 +03:00
lougeniac64 bce2c33963 (Bug 1635487) Wired up sync logging for extension pref storage r=lina,markh
Differential Revision: https://phabricator.services.mozilla.com/D80975
2020-06-27 06:26:22 +00:00
Razvan Maries eb909a6e55 Backed out changeset fec02fef5e73 (bug 1635487) for Android bustages. CLOSED TREE 2020-06-27 03:05:27 +03:00
lougeniac64 893cb93c43 (Bug 1635487) Wired up sync logging for extension pref storage r=lina,markh
Differential Revision: https://phabricator.services.mozilla.com/D80975
2020-06-26 21:19:17 +00:00
Rob Wu 206ca19c33 Bug 1645598 - Vendor application-services for fix in webext-storage r=lina
To get this fix: https://github.com/mozilla/application-services/pull/3235

Updated as follows:

```
sed -i 's/e8d7530319fa6c20d9de78d031c9398630eca3cd/61dcc364ac0d6d0816ab88a494bbf20d824b009b/g' services/fxaccounts/rust-bridge/firefox-accounts-bridge/Cargo.toml services/sync/golden_gate/Cargo.toml toolkit/components/extensions/storage/webext_storage_bridge/Cargo.toml toolkit/components/glean/Cargo.toml toolkit/library/rust/shared/Cargo.toml
./mach vendor rust
```

Verified by running the new regression test that I added in the bug:

```
./mach test toolkit/components/extensions/test/xpcshell/test_ext_storage_{local,sync,sync_kinto}.js
```

Differential Revision: https://phabricator.services.mozilla.com/D79628
2020-06-15 12:56:58 +00:00
Thom Chiovoloni b3cbb2b28e Bug 1629127 - Add sync telemetry for storage.sync migration r=lina,extension-reviewers,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D78573
2020-06-10 22:29:02 +00:00
Mark Hammond 6abadd577b Bug 1639449 - Vendor new application-services to expose kinto migration and sync change notifications. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D76092
2020-05-30 02:44:07 +00:00
Lina Cambridge faf2fd15e4 Bug 1639018 - Change `TaskRunnable::dispatch` to take owned runnables. r=froydnj
This matches how the `Dispatch(already_AddRefed<nsIRunnable>)`
overloads work in C++: `Dispatch` takes ownership of the runnable, and
leaks it if dispatch fails—because the thread manager is shutting down,
for instance. This avoids a race where a runnable can be released on
either the owning or target thread.

Rust doesn't allow arbitrary `Self` types yet (see
rust-lang/rust#44874), so we need to change `dispatch` and
`dispatch_with_options` to be associated methods.

Differential Revision: https://phabricator.services.mozilla.com/D75858
2020-05-20 20:54:49 +00:00
Edouard Oger 30060195fb Bug 1631630 p2 - Implement FxAccounts rust-bridge. r=lina,rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D71852
2020-05-16 01:07:31 +00:00
Noemi Erli cac2780d42 Backed out 2 changesets (bug 1631630) for causing mass braoser chrome failures CLOSED TREE
Backed out changeset 9b8606a93c75 (bug 1631630)
Backed out changeset d57ea5d1921f (bug 1631630)
2020-05-16 02:16:33 +03:00
Edouard Oger 9b739cf68d Bug 1631630 p2 - Implement FxAccounts rust-bridge. r=lina,rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D71852
2020-05-15 20:13:36 +00:00
Lina Cambridge 390e79aba0 Bug 1637809 - Replace `try_fold` with `map` in Golden Gate. r=eoger
Differential Revision: https://phabricator.services.mozilla.com/D75226
2020-05-14 00:00:18 +00:00
Edouard Oger 6e8ef040d3 Bug 1637537 - Bump application-services and anyhow versions. r=vladikoff
Differential Revision: https://phabricator.services.mozilla.com/D75150
2020-05-13 18:36:56 +00:00
Edouard Oger e348b78f5f Bug 1628068 p1 - Vendor viaduct crate. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D70256
2020-05-12 21:36:17 +00:00
Mark Hammond 0640090392 Bug 1637169 - Vendor new application-services. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D74817
2020-05-12 07:53:39 +00:00
Bogdan Tara a823ee6545 Backed out 2 changesets (bug 1628068) for ViaductRequest.cpp related bustages CLOSED TREE
Backed out changeset 013a469557c1 (bug 1628068)
Backed out changeset dcda2ce7b7f9 (bug 1628068)
2020-05-12 00:44:58 +03:00
Edouard Oger 4e005845ab Bug 1628068 p1 - Vendor viaduct crate. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D70256
2020-05-11 21:01:17 +00:00
Bogdan Tara 3df4970bcc Backed out 2 changesets (bug 1628068) for ViaductRequest.cpp related bustages CLOSED TREE
Backed out changeset 928a5891c55d (bug 1628068)
Backed out changeset b6fe5d357bed (bug 1628068)
2020-05-11 23:52:47 +03:00
Edouard Oger 3dc0990bbf Bug 1628068 p1 - Vendor viaduct crate. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D70256
2020-05-11 20:19:11 +00:00
Bogdan Tara 448d53548b Backed out 2 changesets (bug 1628068) for ViaductRequest.cpp related bustages CLOSED TREE
Backed out changeset 1ea8f742ca69 (bug 1628068)
Backed out changeset 3aa2f99843e0 (bug 1628068)
2020-05-11 23:06:31 +03:00
Edouard Oger 8aebe42eda Bug 1628068 p1 - Vendor viaduct crate. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D70256
2020-05-11 19:14:21 +00:00
Lina Cambridge 8caa2f7986 Bug 1634191 - Wire up Golden Gate to the new Rust extension storage interface. r=markh
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
2020-05-05 06:59:32 +00:00
Lina Cambridge 4eafc7c1a6 Bug 1634191 - Pass BSO fields along with Sync record payloads to bridged Rust engines. r=markh
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
2020-05-04 22:25:00 +00:00
Lina Cambridge 7783b7bc0b Bug 1634626 - Add interrupt support for `StorageSyncArea`. r=markh,tcsc
This commit adds a `mozIInterruptible` implementation to
`StorageSyncArea`, and changes `LazyStore` to get an a-s interrupt
handle and interrupt pending operations.

Differential Revision: https://phabricator.services.mozilla.com/D73414
2020-05-04 21:32:52 +00:00
Lina Cambridge a9b590300f Bug 1634626 - Refactor interruption in Golden Gate. r=markh,tcsc
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
2020-05-04 21:32:29 +00:00
Mark Hammond c777f6f9ed Bug 1634257 - expose wipe_all to mozIExtensionStorageArea. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D73191
2020-04-30 08:16:26 +00:00
Stefan Hindli 49c6346195 Backed out changeset 13bb4d7dde88 (bug 1634257) for spidermoney bustages CLOSED TREE 2020-04-30 10:56:43 +03:00
Mark Hammond baecd41165 Bug 1634257 - expose wipe_all to mozIExtensionStorageArea. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D73191
2020-04-30 07:08:38 +00:00
Lina Cambridge add5457732 Bug 1633943 - Support tearing down a Rust `StorageSyncArea`. r=markh
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
2020-04-29 04:35:45 +00:00
Lina Cambridge c13f9f9d49 Bug 1626128 - Change Golden Gate to depend on `sync15_traits`. r=markh
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
2020-04-28 04:13:04 +00:00
Lina Cambridge f9abd62b34 Bug 1596322 - Add XPCOM bindings for Rust Sync engines. r=markh,tcsc,LougeniaBailey
This commit adds a new crate for bridging Rust Sync engines to Desktop,
and a `mozIBridgedSyncEngine` for accessing the bridge via JS.
Naturally, the bridge is called Golden Gate. 😊 For more information
on how to use it, please see `golden_gate/src/lib.rs`.

Other changes include:

* Ensuring the test Sync server uses UTF-8 for requests and responses.
* Renaming `mozISyncedBookmarksMirrorLogger` to `mozIServicesLogger`,
  and moving it into the shared Sync interfaces.

The `BridgedEngine` trait lives in its own crate, called
`golden_gate_traits`, to make it easier to eventually move into a-s.
`Interruptee` and `Interrupted` already exist in a-s, and are
duplicated in this crate for now.

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

--HG--
extra : moz-landing-system : lando
2020-04-09 15:45:37 +00:00
Bogdan Tara 5dcf5dcc85 Backed out changeset d8ef791a2165 (bug 1596322) for browser_all_files_referenced.js failures CLOSED TREE 2020-04-09 13:17:04 +03:00
Lina Cambridge fcb1f70a45 Bug 1596322 - Add XPCOM bindings for Rust Sync engines. r=markh,tcsc,LougeniaBailey
This commit adds a new crate for bridging Rust Sync engines to Desktop,
and a `mozIBridgedSyncEngine` for accessing the bridge via JS.
Naturally, the bridge is called Golden Gate. 😊 For more information
on how to use it, please see `golden_gate/src/lib.rs`.

Other changes include:

* Ensuring the test Sync server uses UTF-8 for requests and responses.
* Renaming `mozISyncedBookmarksMirrorLogger` to `mozIServicesLogger`,
  and moving it into the shared Sync interfaces.

The `BridgedEngine` trait lives in its own crate, called
`golden_gate_traits`, to make it easier to eventually move into a-s.
`Interruptee` and `Interrupted` already exist in a-s, and are
duplicated in this crate for now.

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

--HG--
extra : moz-landing-system : lando
2020-04-09 07:32:52 +00:00
Brindusan Cristian bb29753b0d Backed out changeset 2b02e71f1780 (bug 1596322) for multiple xpcshell failures. CLOSED TREE 2020-04-09 03:39:56 +03:00
Lina Cambridge 186b7665c4 Bug 1596322 - Add XPCOM bindings for Rust Sync engines. r=markh,tcsc,LougeniaBailey
This commit adds a new crate for bridging Rust Sync engines to Desktop,
and a `mozIBridgedSyncEngine` for accessing the bridge via JS.
Naturally, the bridge is called Golden Gate. 😊 For more information
on how to use it, please see `golden_gate/src/lib.rs`.

Other changes include:

* Ensuring the test Sync server uses UTF-8 for requests and responses.
* Renaming `mozISyncedBookmarksMirrorLogger` to `mozIServicesLogger`,
  and moving it into the shared Sync interfaces.

The `BridgedEngine` trait lives in its own crate, called
`golden_gate_traits`, to make it easier to eventually move into a-s.
`Interruptee` and `Interrupted` already exist in a-s, and are
duplicated in this crate for now.

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

--HG--
extra : moz-landing-system : lando
2020-04-08 20:18:37 +00:00