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

92 Коммитов

Автор SHA1 Сообщение Дата
Jan Varga 685aa0cc5e Bug 1728267 - Remove implicit ToResult from QM_TRY when no extra argument is passed in dom/cache; r=dom-storage-reviewers,jstutte,jari
Differential Revision: https://phabricator.services.mozilla.com/D125319
2021-09-24 13:08:30 +00:00
hxu 20f4eab01a Bug 1727497 - Add MOZ_ALWAYS_SUCCEEDS when calling dispatch functions during dom/cache shutdown; r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D125071
2021-09-17 14:07:43 +00:00
Jan Varga cbbe40bbe5 Bug 1711180 - Refactor code for handling STATE_GET_INFO in Context::QuotaInitRunnable::Run; r=dom-storage-reviewers,jstutte
This eliminates the need for using andThen and orElse. This is now consistent
with hanling of STATE_ENSURE_ORIGIN_INITIALIZED.

Differential Revision: https://phabricator.services.mozilla.com/D115127
2021-05-22 06:21:12 +00:00
Jan Varga 09996cc685 Bug 1709067 - CACHE: Remove module specific QM_TRY macros; r=dom-storage-reviewers,jstutte
Depends on D114080

Differential Revision: https://phabricator.services.mozilla.com/D114081
2021-05-03 19:44:39 +00:00
Jan Varga 52647a0d1e Bug 1686031 - Add mPersistenceType to OriginMetadata; r=dom-storage-reviewers,sg
The existing members of OriginMetadata have been extracted to a parent struct
called PrincipalMetadata. Methods like GetOriginUsage,
GetInfoFromValidatedPrincipalInfo, GetInfoFromPrincipal and GetInfoForChrome
have been changed to take/return PrincipalMetadata instead of OriginMetadata.
Having the persistence type doesn't make sense in those methods because the
origin is not tied to a specific persistence type in context of the methods.

Some places temporarily pass PERSISTENCE_TYPE_INVALID and will be fixed in
following patches.

Differential Revision: https://phabricator.services.mozilla.com/D106400
2021-03-04 18:03:02 +00:00
Jan Varga 832c277718 Bug 1686031 - Fold QuotaInfo into OriginMetadata and rename QuotaInfo.h to OriginMetadata.h; r=dom-storage-reviewers,sg
Existing uses of OriginMetadata (with only mGroup and mOrigin) have been
adapted and they now always initialize mSuffix to an empty string.
Following patches will change it to real suffix if there's any.

Differential Revision: https://phabricator.services.mozilla.com/D104971
2021-02-12 21:43:42 +00:00
Jan Varga 9e117b1b8d Bug 1690025 - Move DirectoryLock class to a separate file; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D104154
2021-02-09 10:42:22 +00:00
Butkovits Atila 7ab6339085 Backed out 3 changesets (bug 1690025) for causing failure on Client.h. CLOSED TREE
Backed out changeset 5d5e90d31294 (bug 1690025)
Backed out changeset d2b39aebfad2 (bug 1690025)
Backed out changeset 2684aad61a6b (bug 1690025)
2021-02-09 10:12:28 +02:00
Jan Varga dcca4eaf0c Bug 1690025 - Move DirectoryLock class to a separate file; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D104154
2021-02-09 06:52:57 +00:00
Jan Varga a8d359bfc5 Bug 1689293 - Introduce DirectoryLock::Acquire; r=sg
Quota clients instead of doing:
RefPtr<DirectoryLock> pendingDirectoryLock = qm->OpenDirectory(..., listener);

now do:
RefPtr<DirectoryLock> directoryLock = qm->CreateDirectoryLock(...);
directoryLock->Acquire(listener);

Differential Revision: https://phabricator.services.mozilla.com/D103279
2021-02-02 08:20:18 +00:00
Simon Giesecke 4756746f18 Bug 1682536 - Use references/NotNull in Context. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D99775
2020-12-15 23:25:30 +00:00
Jan Varga fe7c71a9e0 Bug 1680031 - Abort operations for given directory lock ids; r=dom-workers-and-storage-reviewers,sg
This patch changes the way how we abort operations when clearing of data is
requested. Instead of aborting all operations for given origin, we now abort
all operations for given directory locks which are blocking clearing of data.

Differential Revision: https://phabricator.services.mozilla.com/D98609
2020-12-09 08:13:44 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Jan Varga f9fdb2de2a Bug 1619592 - Replace EnsureStorageAndOriginIsInitialized with EnsureTemporaryOriginIsInitialized in dom/cache; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D97258
2020-11-19 15:41:55 +00:00
Jan Varga a7d7c361aa Bug 1619592 - Remove unused aClientType argument in EnsureStorageAndOriginIsInitialized; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D97253
2020-11-17 08:37:00 +00:00
Sylvestre Ledru fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila 964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Simon Giesecke f92973bd13 Bug 1663924 - Replace output parameters by return values on GetInfo* methods. r=dom-workers-and-storage-reviewers,ttung
This also changes all methods that use a pair of group/origin or a tuple of
suffix/group/origin input/output parameters to use a single GroupAndOrigin
resp. QuotaInfo struct input parameter or return value. Also, several types
having a pair or 3-tuple of such data members are changed to use these structs
instead.

Differential Revision: https://phabricator.services.mozilla.com/D91131
2020-10-20 11:46:31 +00:00
Simon Giesecke 8e6a721680 Bug 1663924 - Replace output parameter by return value for EnsureStorageAndOriginIsInitialized. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D92199
2020-10-14 15:46:24 +00:00
ssengupta 2383ba6a82 Bug 1636050 - dom::cache::Action now inherits from SafeRefCounted r=dom-workers-and-storage-reviewers,sg
Depends on D80669

Differential Revision: https://phabricator.services.mozilla.com/D80709
2020-07-01 14:20:12 +00:00
ssengupta 9c107d41f5 Bug 1636050 - dom::cache::Action::Resolver now inherits from SafeRefCounted r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D80669
2020-07-01 14:20:08 +00:00
Jean-Yves Avenard 87438519f0 Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj
Before P1, GetCurrentThreadSerialEventTarget would have always returned the same data as NS_GetCurrentThread, making the comment incorrect Now it will properly return the running TaskQueue if any.

This change of name more clearly exposes what they are doing, as we aren't always dealing with threads directly; but a nsISerialEventTarget

Differential Revision: https://phabricator.services.mozilla.com/D80354
2020-06-23 05:05:36 +00:00
Simon Giesecke bfb7f6a78a Bug 1645339 - Use range-based for with nsTObserverArray in dom/cache. r=dom-workers-and-storage-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D79431
2020-06-17 15:04:24 +00:00
Simon Giesecke 13502cf27c Bug 1642991 - Use RemoveElementsBy where easily possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78055
2020-06-08 09:01:48 +00:00
Simon Giesecke bec9351c13 Bug 1627892 - Make ThreadsafeHandle derive from SafeRefCounted. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D69962
2020-05-11 12:13:25 +00:00
Simon Giesecke 4bd2bbd28a Bug 1627892 - Make ManagerId derive from SafeRefCounted. r=dom-workers-and-storage-reviewers,perry
Differential Revision: https://phabricator.services.mozilla.com/D69961
2020-05-11 12:13:07 +00:00
Simon Giesecke c4c6f0c42c Bug 1627892 - Make Context derive from SafeRefCounted. r=dom-workers-and-storage-reviewers,perry
Differential Revision: https://phabricator.services.mozilla.com/D69957
2020-05-11 12:09:55 +00:00
Simon Giesecke 33a08c2818 Bug 1627892 - Make Manager derive from SafeRefCounted. r=ttung
Differential Revision: https://phabricator.services.mozilla.com/D69956
2020-05-11 12:09:02 +00:00
Jan Varga 45769a3be8 Bug 1606635 - Modify QuotaManager::OpenDirectory to return a pending lock; r=asuth,dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D64715

--HG--
extra : moz-landing-system : lando
2020-02-29 04:42:50 +00:00
Simon Giesecke a813e92dee Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/cache. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63139

--HG--
extra : moz-landing-system : lando
2020-02-20 15:49:27 +00:00
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Jan Varga 6ba032116d Bug 1592934 - Refactor some storage initialization methods before adding new telemetry probes; r=ttung
Differential Revision: https://phabricator.services.mozilla.com/D54307

--HG--
extra : moz-landing-system : lando
2019-11-25 15:04:43 +00:00
Jan Varga 8ea2bacbc6 Bug 1591394 - QM: Add more getters to DirectoryLock; r=ttung
Differential Revision: https://phabricator.services.mozilla.com/D50610

--HG--
extra : moz-landing-system : lando
2019-10-26 08:50:43 +00:00
Tom Tung a973874d9b Bug 1576593 - P2 - Change the way for tunneling quota information to SQLite; r=janv
Differential Revision: https://phabricator.services.mozilla.com/D48183

--HG--
extra : moz-landing-system : lando
2019-10-25 12:02:10 +00:00
Jan Varga ea67826b85 Bug 1547688 - LSNG: Preloading can use gUsages hash table to quickly finish if there's nothing to preload; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D29194
2019-04-29 14:23:55 +02:00
Ryan VanderMeulen 4f044a29d2 Backed out 8 changesets (bug 1513937, bug 1546310, bug 1548788, bug 1547688, bug 1547452, bug 1540777, bug 1542669, bug 1547454) for causing bug 1549362.
Backed out changeset 8dca7df29492 (bug 1548788)
Backed out changeset 688f361e8bb6 (bug 1547688)
Backed out changeset b5d8d57838a3 (bug 1540777)
Backed out changeset d1bd31177b14 (bug 1513937)
Backed out changeset df97dfbb526a (bug 1546310)
Backed out changeset ade08d6dc361 (bug 1547454)
Backed out changeset b622431054b7 (bug 1547452)
Backed out changeset ad73e5604411 (bug 1542669)
2019-05-06 09:02:54 -04:00
Jan Varga 0d5ae59a7b Bug 1547688 - LSNG: Preloading can use gUsages hash table to quickly finish if there's nothing to preload; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D29194
2019-04-29 14:23:55 +02:00
Sylvestre Ledru 03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Csoregi Natalia ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu 24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru 399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jan Varga 6e40a9dccb Bug 1286798 - Part 22: Add support for preloading of datastores; r=asuth
Datastores are preloaded only for content principals. The preloading is triggered as soon as possible to lower the chance of blocking the main thread in content process. If there is no physical database on disk for given origin, datastore is not created. Preloaded datastores are kept alive for 20 seconds.
2018-11-29 21:48:25 +01:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00