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

71 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 09a0eebdd9 Bug 1686749 - Let CreateFile*Stream functions propagate all errors. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D101779
2021-01-28 11:12:19 +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
Simon Giesecke d7abe77fa1 Bug 1671367 - Add overloads of NS_NewLocal*FileStream functions returning a Result and use them. r=dom-workers-and-storage-reviewers,necko-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D94138
2020-11-17 19:30:05 +00:00
Bogdan Tara 0fbb64410b Backed out 8 changesets (bug 1671367) for ActorsParent.cpp related bustage CLOSED TREE
Backed out changeset cacebe0fc34c (bug 1671367)
Backed out changeset 37e2f1c36fc7 (bug 1671367)
Backed out changeset c4a3fca623aa (bug 1671367)
Backed out changeset 75e95ebade6a (bug 1671367)
Backed out changeset bfc08841dafb (bug 1671367)
Backed out changeset 445d4fd6004d (bug 1671367)
Backed out changeset 90e38a8f77d6 (bug 1671367)
Backed out changeset 7e5910c8a82e (bug 1671367)
2020-11-17 21:26:08 +02:00
Simon Giesecke 8aa789e16e Bug 1671367 - Add overloads of NS_NewLocal*FileStream functions returning a Result and use them. r=dom-workers-and-storage-reviewers,necko-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D94138
2020-11-17 15:13:22 +00:00
Simon Giesecke 37c89691c2 Bug 1671369 - Change DirectoryPaddingFileExists to use CACHE_TRY. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93776
2020-11-17 11:36:34 +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
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 2282fb5a6a Bug 1626555 - Make `dom/quota` buildable outside of `unified-build` environment. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D94011
2020-10-21 13:16:19 +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 d5b79ad8da Bug 1667957 - Use new IntTo(C)String functions in dom/quota and its clients. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D91717
2020-10-14 15:45:50 +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 4e7b64f602 Bug 1655067 - Use Result<V, E> for some functions and use CACHE_TRY_VAR for their callsites; r=dom-workers-and-storage-reviewers,sg
Depends on D86209

Differential Revision: https://phabricator.services.mozilla.com/D84837
2020-09-11 07:58:34 +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
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 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
Tom Tung 9e63838884 Bug 1581067 - P5 - Only remove the temporary body files & body directories when it's in the initializing stage; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D47770

--HG--
extra : moz-landing-system : lando
2019-10-02 10:38:55 +00:00
Tom Tung 90165c5421 Bug 1584746 - Ignore the failure if file is not exist; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D47539

--HG--
extra : moz-landing-system : lando
2019-09-30 08:06:05 +00:00
Tom Tung 6621347502 Bug 1581067 - P2 - Extract similar to reuse the code; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D46780

--HG--
extra : moz-landing-system : lando
2019-09-27 16:54:45 +00:00
Tom Tung 8c5237086f Bug 1581067 - P1 - Remove the emptry body directory when removing files inside; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D46586

--HG--
extra : moz-landing-system : lando
2019-09-27 16:54:22 +00:00
Jan Varga 9f906cd7c4 Bug 1563023 - Part 1: Implement per client usage tracking; r=asuth
This patch adds a fixed-size array of client usages to OriginInfo and modifies
quota tracking APIs to require the client type to be passed in.
A new method ResetUsageForClient is implemented. The method is used during
client-specific origin clearing. ResetUsageForClient is much faster than calling
GetUsageForOrigin and calling DecreaseUsageForOrigin after that.
LockedUsage now has an assertion that verifies that the total sum of client
usages matches total origin usage. This method should be called instead of
touching mUsage directly.
A new assertion is added to GetQuotaObject which verifies that passed file
belongs to the given persistence type, origin, and client.

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

--HG--
extra : moz-landing-system : lando
2019-08-22 13:06:48 +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 7981be440b Bug 1286798 - Part 25: Add checks for the group and global limit; r=asuth 2018-11-29 21:48:34 +01:00
Jan Varga 60713ff421 Bug 1361330 - Part 1: Make quota stream constructors public and move the Create() helpers outside of the stream classes; r=asuth 2018-08-20 14:32:33 +02:00
Kris Maglione 6b12d08f7d Bug 1462937: Update callers to use nsIFile::GetDirectoryEntries as a nsIDirectoryEnumerator. r=froydnj
MozReview-Commit-ID: Iv4T1MVAF5

--HG--
extra : rebase_source : 1c518883d082884db7f9323a5acc20361228c26b
extra : histedit_source : 70a73c23d1199d3bfbb5379c78930401166c094b
2018-05-19 20:17:45 -07:00
Tom Tung 89da9c7d42 Bug 1422815 - P1: Fix for failing to get quotaObject unexpectedly. r=bkelly
This patch is for avoiding use quotaObject while it does not exist in Release.
Note that we sill catch this in Beta and Nightly by the assertion.

--HG--
extra : rebase_source : cae8b7816adfa91fdc1e5abae6dc92c506b1719c
2017-12-06 10:12:24 +08:00
Jonathan Watt 5ea9cced68 Bug 1417365 - Unified build issues in dom/cache. r=baku 2017-10-26 12:35:08 +01:00
Andrea Marchesini 6626e900f9 Bug 1409327 - NS_NewBufferedInputStream should take the ownership of the inputStream, r=smaug 2017-10-19 11:39:30 +02:00
Kris Maglione 3876d40960 Bug 1404198: Part 1 - Add non-virtual constructor for nsIObject(Input|Output)Stream and update existing callers. r=njn
MozReview-Commit-ID: 3eoh6AwDJyz

--HG--
extra : rebase_source : 92b18b6ef07d276cac79ce735ca0b592cffbf87e
2017-10-04 20:06:28 -07:00
Tom Tung 82eb515a1a Bug 1402581 - P4: Make the assertions for increaing and decreaing padding size be runtime checks. r=bkelly
--HG--
extra : rebase_source : c5c2dd26334ed05c8143341ddfd47b85f0a0c9ef
2017-10-06 15:18:06 +08:00
Tom Tung 45c9e8c00b Bug 1402581 - P3: Allow failures happen when restoring or wiping padding file. r=bkelly
--HG--
extra : rebase_source : 6582320e3c942c37a8b031e16569a4900871f458
2017-10-05 17:30:40 +08:00
Tom Tung 753c5b5960 Bug 1402581 - P2: Ensure the temporary file exists when failure happens. r=bkelly
There are three changes in this patch: 1. Make sure deleting padding file before
the temporary padding file. 2. Not deleting temporary file when failure happens.
3. Endure failure happens after the transaction commit.

--HG--
extra : rebase_source : d6de5cc63c7cb9bb073e00a61237440bb65fd011
2017-10-03 18:44:56 +08:00
Tom Tung d56be4c5f0 Bug 1398231 - P1: Make file exist check before assertion. r=bkelly
MozReview-Commit-ID: 8t7P97Ttrv1

--HG--
extra : rebase_source : 2d44a42da181612af36f129f692bd4961caf2824
2017-09-09 09:30:05 +08:00
Tom Tung d064e1463f Bug 1290481 - P10: Update padding size to the direcotry padding file. r=bkelly
MozReview-Commit-ID: KlVsaGhpABk

--HG--
extra : rebase_source : 250d8cf6dd6804e8e944982d400a8de79539f7ac
2017-07-18 19:00:09 +08:00
Tom Tung 67d7727ec0 Bug 1290481 - P9: Implement a function to get overall padding size for an origin from cache.sqlite. r=bkelly
MozReview-Commit-ID: KlVsaGhpABk

--HG--
extra : rebase_source : a6956325cfdf6f11a4bcf66d41b8d4706ae4e1e7
2017-07-18 18:58:56 +08:00
Tom Tung 8eb68da410 Bug 1290481 - P8: Implement few utility functions to access direcotry padding file. r=bkelly
MozReview-Commit-ID: KlVsaGhpABk

--HG--
extra : rebase_source : 23145f66eb62f2f858311513f6bec4ead01d18cd
2017-07-18 18:57:54 +08:00