Jan Varga b5528e4e85 Bug 1928939 - LSNG: Allow one single prepare datastore operation to block multiple prepare datastore operations; r=dom-storage-reviewers,asuth, a=dmeehan
Bug 1919788 introduced calling OpenClientDirectory as a first step, which made
it possible for PrepareDatastoreOp::CheckExistingOperations to not be called in
the same order as the operations were created. If OpenClientDirectory is called
multiple times with the same arguments, the promises can be resolved/rejected
in random order. This issue became even more apparent after bug 1866402, which
added origin initialization to OpenClientDirectory.

The serialization based on mDelayedOp can only reliably work if
CheckExistingOperations is invoked in the same order as operations are created.
Therefore, the operations now utilize a more sophisticated method to track
dependencies.

This fix implements a robust dependency tracking mechanism using mBlocking and
mBlockedOn lists, ensuring that each PrepareDatastoreOp proceeds in a
serialized manner based on its dependencies, thereby maintaining the correct
order of operations and enhancing stability in datastore preparations.

Differential Revision: https://phabricator.services.mozilla.com/D227985
2024-11-05 18:46:40 +00:00

An explanation of the Firefox Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://firefox-source-docs.mozilla.org/contributing/directory_structure.html

For information on how to build Firefox from the source code and create the patch see:

    https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html

If you have a question about developing Firefox, and can't find the solution
on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel.


Nightly development builds can be downloaded from:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://www.mozilla.org/firefox/channel/desktop/#nightly

Keep in mind that nightly builds, which are used by Firefox developers for
testing, may be buggy.
Description
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Readme 6.1 GiB
Languages
JavaScript 32.3%
C++ 25.4%
HTML 21%
C 10.8%
Python 2.8%
Other 7.2%