mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
99b7c7c7de
This commit introduces a Rust XPCOM component, `mozISyncedBookmarksMerger`, that wraps the Dogear crate for merging and applying synced bookmarks. How this works: `SyncedBookmarksMirror.jsm` manages opening the connection, initializing the schema, and writing incoming items into the mirror database. The new `mozISyncedBookmarksMerger` holds a handle to the same connection. When JS code calls `mozISyncedBookmarksMerger::apply`, the merger builds local and remote trees, produces a merged tree, applies the tree back to Places, and stages outgoing items for upload in a temp table, all on the storage thread. It then calls back in to JS, which inflates Sync records for outgoing items, notifies Places observers, and cleans up. Since Dogear has a more robust merging algorithm that attempts to fix up invalid trees, `test_bookmark_corruption.js` intentionally fails. This is fixed in the next commit, which changes the merger to handle invalid structure. Differential Revision: https://phabricator.services.mozilla.com/D20076 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
dummydll | ||
gtest | ||
rust | ||
dependentlibs.py | ||
gecko.natvis | ||
libxul.so-gdb.py.in | ||
Makefile.in | ||
moz.build | ||
nsDllMain.cpp | ||
StaticXULComponents.ld | ||
symverscript.in | ||
xulrunner.rc |