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

94 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 4e33445ac3 Bug 1687254 - Skip directory entries that no longer exist in GetBodyUsage. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D102204
2021-01-21 15:33:04 +00:00
Simon Giesecke b011d2e6fb Bug 1683828 - Use QM_TRY et al. in QuotaClient. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D100770
2021-01-18 08:52:06 +00:00
Simon Giesecke 731e2bb3f2 Bug 1683828 - Use QM_TRY et al. in FileUtils and modernize signatures. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D100320
2021-01-14 16:42:32 +00:00
Simon Giesecke aa680355aa Bug 1679540 - Extract CollectEachFile function and use in quota manager and clients. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D98075
2021-01-05 09:27:18 +00:00
Mihai Alexandru Michis a4520f52a9 Backed out changeset 9ef5f1fe26e8 (bug 1679540) for causing Bug 1683863. a=backout 2020-12-22 17:00:34 +02:00
Simon Giesecke 0a86aba723 Bug 1679540 - Extract CollectEachFile function and use in quota manager and clients. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D98075
2020-12-21 18:13:56 +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
Jan Varga ccea28442b Bug 1680031 - Introduce Client::AbortAllOperations; r=dom-workers-and-storage-reviewers,sg
Client::AbortOperations no longer supports the case when an empty origin string
is passed (which was used to abort all operations).

Differential Revision: https://phabricator.services.mozilla.com/D98344
2020-12-02 16:38:07 +00:00
Simon Giesecke 6f59efdcd5 Bug 1672369 - Record Cache API shutdown steps. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D94740
2020-11-30 13:04:23 +00:00
Simon Giesecke 257530e1da Bug 1672369 - Unify handling shutdown timeout of quota clients. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D94318
2020-11-30 10:40:59 +00:00
Simon Giesecke bafe1df218 Bug 1672369 - Pull up common ShutdownWorkThreads into QuotaClient. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D94298
2020-11-26 09:20:03 +00:00
Simon Giesecke 3236acba9d Bug 1671369 - Change GetUsageForClient to return a UsageInfo. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93777
2020-11-17 13:17:24 +00:00
Simon Giesecke dec6e1d21c Bug 1671369 - Change LockedDirectoryPaddingGet to return a Result and use CACHE_TRY. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93775
2020-11-17 09:07:03 +00:00
Simon Giesecke a52d798cb2 Bug 1671369 - Change LockedDirectoryPaddingRestore to return a Result and use CACHE_TRY. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93774
2020-11-17 09:04:35 +00:00
Simon Giesecke fe283bda0a Bug 1671369 - Change OpenDBConnection to return a Result. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93773
2020-11-17 09:04:33 +00:00
Simon Giesecke 669e845944 Bug 1671369 - Extract ReduceEach function from ReduceUsageInfo. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93772
2020-11-17 09:04:28 +00:00
Simon Giesecke cbccc42eb2 Bug 1671369 - Extract ReduceUsageInfo function from GetBodyUsage and GetUsageForOriginInternal. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93771
2020-11-17 09:04:25 +00:00
Simon Giesecke 56ab947139 Bug 1671369 - Change GetBodyUsage to return a Result. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93769
2020-11-17 09:04:23 +00:00
Simon Giesecke 923504afa0 Bug 1671369 - Move anonymous namespace inside mozilla::dom::cache. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D93767
2020-11-17 09:04:21 +00:00
Simon Giesecke dcd436349e Bug 1671369 - Change LockedGetPaddingSizeFromDB to return a Result. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D93766
2020-11-17 09:04:18 +00:00
Simon Giesecke ef9d87ac52 Bug 1671369 - Use CACHE_TRY in CacheQuotaClient::GetUsageForOriginInternal. r=ttung
Differential Revision: https://phabricator.services.mozilla.com/D93662
2020-11-17 09:04:16 +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 20a9b720d4 Bug 1666219 - Renamed QM_TRY_VAR etc. to QM_TRY_UNWRAP etc. r=dom-workers-and-storage-reviewers,ttung,janv
Also change some left-over QM_TRY_VAR uses with const target declarations to
QM_TRY_INSPECT et al.

Differential Revision: https://phabricator.services.mozilla.com/D90873
2020-10-02 13:23:49 +00:00
Sebastian Hengst ae5e3a0d7c Backed out 5 changesets (bug 1666219, bug 1665347) for crashing hazard task. CLOSED TREE.
Backed out changeset c261ec06a826 (bug 1665347)
Backed out changeset 212c9df41410 (bug 1665347)
Backed out changeset 435f02d9f1d7 (bug 1665347)
Backed out changeset 7b36a79247b7 (bug 1666219)
Backed out changeset af8025162523 (bug 1665347)
2020-10-01 23:17:19 +02:00
Simon Giesecke 8598a731fc Bug 1666219 - Renamed QM_TRY_VAR etc. to QM_TRY_UNWRAP etc. r=dom-workers-and-storage-reviewers,ttung,janv
Also change some left-over QM_TRY_VAR uses with const target declarations to
QM_TRY_INSPECT et al.

Differential Revision: https://phabricator.services.mozilla.com/D90873
2020-10-01 15:37:50 +00:00
Bogdan Tara 104db9798f Backed out 5 changesets (bug 1666219, bug 1665347) for indexedDB related bustage CLOSED TREE
Backed out changeset 5cd7e2d67f91 (bug 1665347)
Backed out changeset 9159fdd05097 (bug 1665347)
Backed out changeset 64a086636738 (bug 1665347)
Backed out changeset 5ef18af381ec (bug 1666219)
Backed out changeset 3b81349a5f39 (bug 1665347)
2020-10-01 17:41:23 +03:00
Simon Giesecke 4c5b983d6f Bug 1666219 - Renamed QM_TRY_VAR etc. to QM_TRY_UNWRAP etc. r=dom-workers-and-storage-reviewers,ttung,janv
Also change some left-over QM_TRY_VAR uses with const target declarations to
QM_TRY_INSPECT et al.

Differential Revision: https://phabricator.services.mozilla.com/D90873
2020-10-01 12:02:26 +00:00
Tom Tung c142edf3a3 Bug 1655067 - Replace raw pointer input parameters by reference; r=dom-workers-and-storage-reviewers,sg
Depends on D85972

Differential Revision: https://phabricator.services.mozilla.com/D84836
2020-09-11 08:13:04 +00:00
Tom Tung 75112e975a Bug 1661711 - Use Result<V, E> for GetDirectoryOrigin and use *_TRY_VAR for its callsites; r=sg,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D89704
2020-09-10 12:37:37 +00:00
Tom Tung e5e50f34c8 Bug 1647316 - Treat all usages in DOM Cache as database usages; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D86529
2020-08-18 09:29:03 +00:00
Simon Giesecke 9364b353d4 Bug 1648010 - Remove NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80631
2020-07-01 08:42:31 +00:00
Simon Giesecke e3c223da3e Bug 1648010 - Fix uses of NS_LITERAL_STRING with C string literals. r=geckoview-reviewers,agi,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80861
2020-07-01 08:34:12 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Simon Giesecke 8193fe19be Bug 1641512 - Use distinct types for file and database usage. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D77462
2020-06-25 09:30:06 +00:00
Simon Giesecke 935a26e070 Bug 1641512 - Use Result<UsageInfo, nsresult> as return type of GetUsageForOriginInternal. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D77454
2020-06-25 08:35:13 +00:00
Simon Giesecke 55e3bdd7f8 Bug 1641512 - Use Result<UsageInfo, nsresult> as return type of InitOrigin and add separate InitOriginWithoutTracking. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D77453
2020-06-25 09:31:39 +00:00
Simon Giesecke c23800e5f2 Bug 1641512 - Use Result<UsageInfo, nsresult> as return type of GetUsageForOrigin. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D77452
2020-06-25 08:34:43 +00:00
Tom Tung ad521d4997 Bug 1645943 - Check results from nsIFile's functions rather than mozStorage's/SQLite's in LockedGetPaddingSizeFromDB; r=janv,dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D79959
2020-06-23 06:38:25 +00:00
Brindusan Cristian a338574f2d Backed out 2 changesets (bug 1645943) for build bustages on QuotaClient.cpp. CLOSED TREE
Backed out changeset 7a2022403814 (bug 1645943)
Backed out changeset 3ed2b9424225 (bug 1645943)
2020-06-23 01:11:33 +03:00
Tom Tung ab0b6d3117 Bug 1645943 - Check results from nsIFile's functions rather than mozStorage's/SQLite's in LockedGetPaddingSizeFromDB; r=janv,dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D79959
2020-06-22 16:17:35 +00:00
Simon Giesecke 2e8e66ab3c Bug 1641512 - Rename AppendTo*Usage methods to Increment*Usage. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D77450
2020-06-11 10:42:16 +00:00
Jan Varga 42f5cca14e Bug 1621916 - Fix IndexedDB to ignore unknown files in the client directory during initialization and usage calculation; r=dom-workers-and-storage-reviewers,sg,ttung
Differential Revision: https://phabricator.services.mozilla.com/D77073
2020-05-28 11:14:52 +00:00
Jan Varga d123d73b2d Bug 1621916 - Remove unused argument in Client::InitOrigin; r=dom-workers-and-storage-reviewers,sg
Depends on D77070

Differential Revision: https://phabricator.services.mozilla.com/D77072
2020-05-27 15:52:49 +00:00
Simon Giesecke f776d67e10 Bug 1627918 - Make dom/cache build outside unified build environment. r=dom-workers-and-storage-reviewers,ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D69978

--HG--
extra : moz-landing-system : lando
2020-04-14 23:51:44 +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