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

317 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 53e4e4c078 Bug 1626570 - Improve handling of copying arrays in dom/quota/. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D73629
2020-05-05 12:58:56 +00:00
Jan Varga 0d91cacd5b Bug 1624802 - Add a method for retrieving storage name in tests; r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D73144
2020-05-05 06:25:18 +00:00
Jan Varga 00dceeab95 Bug 1624802 - Add a pref for overriding storage name; r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D73142
2020-05-05 06:24:17 +00:00
Sylvestre Ledru 34acbb653a Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
Tom Tung 02b4a20039 Bug 1626846 - Disable useDOSDevicePathSyntax for QuotaStorage on Windows; r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D69318

--HG--
extra : moz-landing-system : lando
2020-04-06 09:28:35 +00:00
Tom Tung 94e4123950 Bug 1536796 - P3 - Use QM_NewLocalFile in QM and its clients; r=janv,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D67875

--HG--
extra : moz-landing-system : lando
2020-04-01 07:26:27 +00:00
André Bargull 14ca007916 Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj
Also adds missing includes in some files, these were previously only transivitely
included through mozilla/TypeTraits.h.

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

--HG--
extra : moz-landing-system : lando
2020-03-28 16:00:09 +00:00
André Bargull ebec34a898 Bug 1625138 - Part 16: Replace mozilla::IsIntegral with std::is_integral. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68371

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:15 +00:00
André Bargull 9ad58ea608 Bug 1625138 - Part 13: Replace mozilla::IsUnsigned with std::is_unsigned. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68368

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:14 +00:00
Simon Giesecke 58d0171406 Bug 1620632 - Ensure nsTArray_Impl only declares a copy-constructor/assignment operator if E is copy-constructible. r=froydnj
To correctly implement this, it must be known on instantiation whether E is
copy-constructible, which is not the case if only a forward declaration is
available. This can be resolved either by making sure a full definition of E is
available, which is preferable. But in cases where this is not (easily) possible,
the information can be explicitly provided by the MOZ_DECLARE_COPY_CONSTRUCTIBLE
and MOZ_DECLARE_NON_COPY_CONSTRUCTIBLE macros. In particular, declarations for
IPDL-declared types are added to nsTArray.h itself, like it was already done
for MOZ_DECLARE_RELOCATE_USING_MOVE_CONSTRUCTOR.

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

--HG--
extra : moz-landing-system : lando
2020-03-20 17:13:51 +00:00
Jan Varga 188bead06b Bug 1619592 - Update selected operations to not implicitly initialize storage; r=dom-workers-and-storage-reviewers,sg
All initialization related operations, the clear all operation and reset
operations now fail if storage is not initialized. All other operations make
sure storage is initialized by setting the mNeedsStorageInit flag.
DirectoryWork() for these operations now assert that storage is initialized.

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

--HG--
extra : moz-landing-system : lando
2020-03-17 13:07:23 +00:00
Jan Varga e5f5d6eb65 Bug 1619592 - Remove aResetAll param from nsIQuotaManagerService::ResetStoragesForPrincipal; r=dom-workers-and-storage-reviewers,sg
The aResetAll param has been removed from resetStoragesForPrincipal since
there's no use case for it right now (if there's a use case for it in future, it
should be handled by a separate method like resetOriginsByPrefix).

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

--HG--
extra : moz-landing-system : lando
2020-03-17 13:01:38 +00:00
Jan Varga 3cd7583a34 Bug 1619592 - Separate ResetOriginOp from ClearOriginOp; r=dom-workers-and-storage-reviewers,sg
ResetOriginOp has been separated from ClearOriginOp for better readibility of
code.

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

--HG--
extra : moz-landing-system : lando
2020-03-17 13:06:47 +00:00
Jan Varga c0757a0c2c Bug 1619592 - Refactor client type checks using new Client::IsValidType method; r=dom-workers-and-storage-reviewers,sg
This patch moves client type checks to the parameter validation phase. The checks are now done using new Client::IsValidType method.

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

--HG--
extra : moz-landing-system : lando
2020-03-17 13:06:30 +00:00
Jan Varga 5cebbc21b1 Bug 1619592 - Refactor persistence type checks using new IsValidPersistenceType method; r=dom-workers-and-storage-reviewers,sg
This patch makes use of the IsValidPersistenceType function it adds at places where individual checks were done before. It also moves some checks to the parameter validation phase.

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

--HG--
extra : moz-landing-system : lando
2020-03-17 13:06:17 +00:00
Jan Varga a87575bf55 Bug 1619592 - Rationalize PersistenceTypeTo* and PersistenceTypeFrom* methods; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D65937

--HG--
extra : moz-landing-system : lando
2020-03-13 12:55:20 +00:00
Tom Tung 130b9fec28 Bug 1619910 - P2 - Collect the success rates of upgrades from indexedDB/ and storage/persistent/ directory; r=janv,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D65469

--HG--
extra : moz-landing-system : lando
2020-03-11 12:52:04 +00:00
Tom Tung f73f17be94 Bug 1619910 - P1 - Change MaybeUpgradeFrom* to UpgradeFrom*; r=janv,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D65523

--HG--
extra : moz-landing-system : lando
2020-03-11 12:51:26 +00:00
shindli 0b7c33c8d9 Backed out changeset 50af9d58c645 (bug 1619592) for causing build bustages in /builds/worker/checkouts/gecko/dom/quota/PersistenceType.cpp CLOSED TREE 2020-03-11 10:37:51 +02:00
Jan Varga a415028a3c Bug 1619592 - Rationalize PersistenceTypeTo* and PersistenceTypeFrom* methods; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D65937

--HG--
extra : moz-landing-system : lando
2020-03-11 08:08:46 +00:00
Jan Varga c603f2f85e Bug 1607692 - Wait for all normal origin operations to finish before shutting down QuotaManager; r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D64989

--HG--
extra : moz-landing-system : lando
2020-03-03 08:47:07 +00:00
Jan Varga 1354a74058 Bug 1607692 - Change return type of QuotaUsageRequestBase::Init and QuotaRequestBase::Init from bool to void; r=dom-workers-and-storage-reviewers,ttung
These methods never return false, so they can be safely converted to return void.

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

--HG--
extra : moz-landing-system : lando
2020-03-03 08:12:41 +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
Oana Pop Rus d001aab6bf Backed out changeset ad8efac474bf (bug 1606635) for build bustages multiple failures in Context.cpp on a CLOSED TREE 2020-02-29 06:17:22 +02:00
Jan Varga 39371e357b 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:02:13 +00:00
Eric Rahm e61be8e54e Bug 1617653 - Remove nsAutoPtr usage from localstorage, quota, storage, simpledb. r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D63913

--HG--
extra : moz-landing-system : lando
2020-02-25 23:14:57 +00:00
Sylvestre Ledru ca6530131a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan,kvark
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-02-24 15:33:38 +00:00
Jan Varga 34927b46f0 Bug 1616003 - QM: Make it possible to verify initialization status from unit tests; r=ttung,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D63052

--HG--
extra : moz-landing-system : lando
2020-02-22 07:57:28 +00:00
Simon Giesecke 9350e6b741 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 11:40:14 +00:00
Dorel Luca d5f9df8ee1 Backed out 2 changesets (bug 1613985) for Build bustage on Windows2012. CLOSED TREE
Backed out changeset fd177b40b561 (bug 1613985)
Backed out changeset fb6d62b7f28d (bug 1613985)
2020-02-19 22:22:41 +02:00
Simon Giesecke 59b23375c0 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 18:05:38 +00:00
Tom Tung 9bea5d80bc Bug 1610880 - Do not remove the empty origin directory when clearing a client; r=janv
Differential Revision: https://phabricator.services.mozilla.com/D62434

--HG--
extra : moz-landing-system : lando
2020-02-11 14:51:13 +00:00
Simon Giesecke 861998c782 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/quota. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D62557

--HG--
extra : moz-landing-system : lando
2020-02-12 10:25:22 +00:00
Tom Tung 9b0da9363f Bug 1609625 - P1 - Add a temporary scalar probes to get the longest initializattion time; r=janv,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D61231

--HG--
extra : moz-landing-system : lando
2020-02-10 10:43:06 +00:00
Tom Tung c92ce328e9 Bug 1607770 - Drop QM_REPOSITORIES_INITIALIZATION_TIME; r=janv
Differential Revision: https://phabricator.services.mozilla.com/D60116

--HG--
extra : moz-landing-system : lando
2020-01-17 18:32:44 +00:00
Jan Varga f0098d5b2f Bug 1608025 - Clean up the test for the upgrade from storage version 2.1; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D59710

--HG--
rename : dom/quota/test/unit/test_unknownFiles.js => dom/quota/test/unit/upgrades/test_unknownFiles.js
rename : dom/quota/test/unit/upgrades/test_obsoleteOrigins.js => dom/quota/test/unit/upgrades/test_upgradeStorageFrom2_1.js
rename : dom/quota/test/unit/upgrades/version2_2upgrade_profile.zip => dom/quota/test/unit/upgrades/version2_1_profile.zip
extra : moz-landing-system : lando
2020-01-14 06:16:52 +00:00
Jan Varga c93adc6459 Bug 1608025 - Clean up the tests for the upgrade from storage version 1.0; r=asuth
This patch also fixes the code to correctly handle the removal of appId origin
attribute.

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

--HG--
rename : dom/quota/test/unit/upgrades/test_morgueCleanup.js => dom/quota/test/unit/upgrades/test_upgradeStorageFrom1_0_removeMorgueDirectory.js
rename : dom/quota/test/unit/upgrades/test_obsoleteOriginAttributesUpgrade.js => dom/quota/test/unit/upgrades/test_upgradeStorageFrom1_0_stripObsoleteOriginAttributes.js
rename : dom/quota/test/unit/upgrades/morgueCleanup_profile.zip => dom/quota/test/unit/upgrades/version1_0_morgueDirectory_profile.zip
rename : dom/quota/test/unit/upgrades/obsoleteOriginAttributes_profile.zip => dom/quota/test/unit/upgrades/version1_0_obsoleteOriginAttributes_profile.zip
extra : moz-landing-system : lando
2020-01-14 06:19:50 +00:00
Jan Varga 37fc02fdf4 Bug 1608025 - Add tests for the removal of old indexedDB/ and storage/persistent/ directories; r=asuth
This patch also refactors relevant upgrade methods to do the removal directly.

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

--HG--
extra : moz-landing-system : lando
2020-01-14 02:53:16 +00:00
Jan Varga 68e8c0c78c Bug 1608025 - Clean up the test for the upgrade from storage/persistent/ directory; r=asuth
An additional test is added for the complete upgrade from flat origin directories.

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

--HG--
rename : dom/quota/test/unit/upgrades/persistentStorageDirectory_flatOriginDirectories_profile.zip => dom/quota/test/unit/upgrades/persistentStorageDirectory_originDirectories_profile.zip
rename : dom/quota/test/unit/upgrades/defaultStorageUpgrade_profile.zip => dom/quota/test/unit/upgrades/persistentStorageDirectory_profile.zip
rename : dom/quota/test/unit/upgrades/test_defaultStorageUpgrade.js => dom/quota/test/unit/upgrades/test_upgradeFromPersistentStorageDirectory.js
rename : dom/quota/test/unit/upgrades/test_upgradeFromFlatOriginDirectories.js => dom/quota/test/unit/upgrades/test_upgradeFromPersistentStorageDirectory_upgradeOriginDirectories.js
extra : moz-landing-system : lando
2020-01-14 02:51:42 +00:00
Jan Varga 2159f2fcd8 Bug 1608025 - Clean up the test for the upgrade from indexedDB/ directory; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D59700

--HG--
rename : dom/quota/test/unit/upgrades/storagePersistentUpgrade_profile.zip => dom/quota/test/unit/upgrades/indexedDBDirectory_profile.zip
rename : dom/quota/test/unit/upgrades/test_storagePersistentUpgrade.js => dom/quota/test/unit/upgrades/test_upgradeFromIndexedDBDirectory.js
extra : moz-landing-system : lando
2020-01-14 02:50:08 +00:00
Jan Varga e575c0d8c6 Bug 1608025 - Legacy upgrade methods should only be called when storage.sqlite doesn't exist; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D59663

--HG--
extra : moz-landing-system : lando
2020-01-14 02:43:40 +00:00
Eric Rahm 78ee6675cf Bug 1606187 - Part 2b: Update users of nsClassHashtable to handle UniquePtr differences r=KrisWright,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D59042

--HG--
extra : moz-landing-system : lando
2020-01-13 19:18:56 +00:00
Jan Varga b6698c1d76 Bug 1606318 - Don't initialize storage for the reset operation; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D58373

--HG--
extra : moz-landing-system : lando
2019-12-31 02:26:27 +00:00
Tom Tung 09c32538fb Bug 1594075 - P1 - Ignore the unknown directories in origin directories; r=janv
Differential Revision: https://phabricator.services.mozilla.com/D51873

--HG--
extra : moz-landing-system : lando
2019-12-18 15:50:18 +00:00
Tom Tung 3f2680cc2c Bug 1592934 - Revert the accidental changes on D55653; r=janv
Differential Revision: https://phabricator.services.mozilla.com/D56711

--HG--
extra : moz-landing-system : lando
2019-12-11 10:40:49 +00:00
Tom Tung 5775eb8fb7 Bug 1592934 - Measure the success rate for the UpgradeStorageFrom* functions and the InitializeRepository function per repository; r=janv,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D55834

--HG--
extra : moz-landing-system : lando
2019-12-11 08:27:01 +00:00
Jan Varga 143724b74b Bug 1592934 - Abstract first initialization attempt recording into a standalone class; r=ttung,dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D55653

--HG--
extra : moz-landing-system : lando
2019-12-11 08:22:47 +00:00
Jan Varga f6d7565873 Bug 1592934 - Change some bools to bitfields before adding new telemetry probes; r=ttung
Differential Revision: https://phabricator.services.mozilla.com/D54902

--HG--
extra : moz-landing-system : lando
2019-12-09 18:47:56 +00:00
Tom Tung 77e83b90da Bug 1592934 - Add telemetry probes to track persistent origins and temporary origins initialization success rate; r=janv
Differential Revision: https://phabricator.services.mozilla.com/D53392

--HG--
extra : moz-landing-system : lando
2019-12-11 08:20:46 +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