Wire up the Golden Gate Sync bridge to Rust extension storage
Categories
(WebExtensions :: Storage, task, P1)
Tracking
(firefox78 fixed)
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: lina, Assigned: lina)
References
()
Details
(Whiteboard: SACI)
Attachments
(2 files)
Now that we've vendored webext_storage
and have a shiny XPCOM component for our new Rust extension storage area, let's make it implement mozIBridgedSyncEngine
, and wire up its methods to call into the BridgedSyncEngine
on the Rust side. This depends on getting Mark's sync infrastructure patch landed on the a-s side, and bumping our vendored version to pick up those changes.
While we're here, we can also add a JS Sync engine for the new Rust extension storage.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
We'll need to vendor https://github.com/mozilla/application-services/pull/3064 as part of this.
Assignee | ||
Comment 2•5 years ago
|
||
This commit adds syncing support to the StorageSyncArea
class, via
the Golden Gate library.
Assignee | ||
Comment 3•5 years ago
|
||
I haven't done the JS side of this yet (adding a class ExtensionStorageEngine extends BridgedEngine
), and it's going to need some changes to the JS code so that we can pass modified
and deleted
through on the JSON records—but I wanted to get the Rust side up for review! I'll finish off the JS tomorrow, and maybe by then we'll have landed https://github.com/mozilla/application-services/pull/2892 and https://github.com/mozilla/application-services/pull/3064, and we can vendor everything in one go and have a full syncing implementation working! 🎉
We could even do the JS side later, if we want...but then we'd have to make another intermediate bug blocking 1634615. 😁
Assignee | ||
Comment 4•5 years ago
|
||
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.
Assignee | ||
Comment 5•5 years ago
|
||
adding a
class ExtensionStorageEngine extends BridgedEngine
)
I still haven't done this...
and it's going to need some changes to the JS code so that we can pass
modified
anddeleted
through on the JSON records.
But I did that. The a-s side is in https://github.com/mozilla/application-services/pull/3067. It's a little complicated (of course! 😂😭) because I wanted to reuse the existing Payload
type in sync15_traits
for the cleartext, and pass the metadata fields in a wrapper in a more generic way.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
Comment 8•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 10•5 years ago
|
||
bugherder |
Description
•