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

775 Коммитов

Автор SHA1 Сообщение Дата
Tom Tung 061f3b01c3 Bug 1641231 - Replace new operator with MakeRefPtr for constructing actor classes; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D77077
2020-05-29 12:34:52 +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
Jan Varga e7a857459c Bug 1621916 - Add unknown files for Cache API morgue directory and its subdirectories; r=dom-workers-and-storage-reviewers,ttung
Cache API is currently not consistent regarding unknown files. Some unknown
files are reported and ignored, other unknown files are reported and deleted or
just silently deleted without a warning.
Quota Manager, IndexedDB, SimpleDB and LocalStorage currently report and ignore
such files. We should try to unify this in future.

Differential Revision: https://phabricator.services.mozilla.com/D76718
2020-05-27 14:31:59 +00:00
Jan Varga 5183f79beb Bug 1621916 - Unify reporting of unknown files across quota manager, idb, sdb and ls quota client; r=dom-workers-and-storage-reviewers,ttung
Depends on D76703

Differential Revision: https://phabricator.services.mozilla.com/D76717
2020-05-26 07:02:07 +00:00
Jan Varga 68a6cbf429 Bug 1621916 - Fix IndexedDB to ignore unknown files in the files and journals directory during initialization and usage calculation; r=dom-workers-and-storage-reviewers,ttung
All unknown files in the files and journals directory are now properly filtered
out if the filename can't be converted to an integer.

Differential Revision: https://phabricator.services.mozilla.com/D76703
2020-05-26 07:22:12 +00:00
Jan Varga e93eaffe2e Bug 1621916 - Run test_unknownFiles.js in multiple modes; r=dom-workers-and-storage-reviewers,ttung
The functionality needs to be verified for all initialization states (modes)
since some methods don't automatically trigger temporary storage initialization
which results in calling different quota client methods (for example
GetUsageForOrigin calls either Client::InitOrigin or Client::GetUsageForOrigin).

Depends on D76701

Differential Revision: https://phabricator.services.mozilla.com/D76702
2020-05-28 10:03:59 +00:00
Jan Varga 4acff3dff1 Bug 1621916 - Fix SimpleDB to ignore unknown files during initialization and usage calculation; r=dom-workers-and-storage-reviewers,ttung
SimpleDB files on disk now use a suffix, so unknown files can be filtered out.

Depends on D76700

Differential Revision: https://phabricator.services.mozilla.com/D76701
2020-05-25 15:57:54 +00:00
Jan Varga 6b9c3a93f9 Bug 1621916 - Extract profile creation from test_unknownFiles.js into make_unknownFiles.js and make it more sophisticated; r=dom-workers-and-storage-reviewers,ttung
A generated profile now matches real world profiles:
- contains directory metadata
- contains real quota client specific files
- contains unique non-empty unknown files (instead of empty foo.bar files)
- contains unique non-empty unknown directories (instead of empty foo dirs)

There's now only one origin directory which contains unknown files and
directories. All methods that take a principal are verified to work with the
origin direcrtory.

Depends on D76095

Differential Revision: https://phabricator.services.mozilla.com/D76700
2020-05-25 16:01:32 +00:00
Jan Varga 22dd0c4c8d Bug 1621916 - Update test_unknownFiles.js with unknown files for cache, sdb and ls quota client; r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D76095
2020-05-28 08:34:06 +00:00
Jan Varga 7735eac323 Bug 1621916 - Enhance test_unknownFiles.js to cover initTemporaryStorage method; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D75952
2020-05-26 08:24:49 +00:00
Jan Varga 93f51d3a5d Bug 1621916 - Convert test_unknownFiles.js to use quasi subtests; r=dom-workers-and-storage-reviewers,sg
Depends on D75950

Differential Revision: https://phabricator.services.mozilla.com/D75951
2020-05-28 07:58:56 +00:00
Jan Varga ca29971168 Bug 1621916 - Convert test_unknownFiles.js to use async functions; r=dom-workers-and-storage-reviewers,sg
Depends on D75949

Differential Revision: https://phabricator.services.mozilla.com/D75950
2020-05-28 07:57:43 +00:00
Jan Varga 63f5c04b35 Bug 1621916 - Remove redundant checks that were needed before we started ignoring unknown files and directories; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D75949
2020-05-27 15:02:29 +00:00
Jan Varga 1345656755 Bug 1621916 - Simplify test_unknownFiles.js by merging stage 1 and stage 2; r=dom-workers-and-storage-reviewers,ttung
We plan to replace this test with more thorough tests in bug 1620277, but for
now it's still needed and will be part of a short term fix for ignoring
unknown files and directories.

Differential Revision: https://phabricator.services.mozilla.com/D75948
2020-05-27 15:02:04 +00:00
Mihai Alexandru Michis 37ef8a125d Backed out changeset a845717e4d10 (bug 1482279) for causing multiple failures.
CLOSED TREE
2020-05-23 02:22:20 +03:00
Masatoshi Kimura 0701e89b7e Bug 1482279 - Stop using Cu.forcePermissiveCOWs() in SpecialPowers. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D74641
2020-05-22 21:46:25 +00:00
Jan Varga 626676da02 Bug 1638831 - Rename clearStorageForPrincipal to clearStoragesForPrincipal in tests; r=dom-workers-and-storage-reviewers,ttung
Depends on D75786

Differential Revision: https://phabricator.services.mozilla.com/D75788
2020-05-18 13:05:28 +00:00
Jan Varga 99503e97e8 Bug 1638831 - Clean up the test for clearStoragesForOriginAttributesPattern(); r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D75786
2020-05-18 13:05:25 +00:00
Bogdan Tara dc69f70165 Backed out 2 changesets (bug 1624802) for test_listOrigins.js failures CLOSED TREE
Backed out changeset e374ffe2e05e (bug 1624802)
Backed out changeset 8e2da4b3c32b (bug 1624802)
2020-05-14 19:56:00 +03:00
Jan Varga 17f553f88d Bug 1624802 - Run some dom/quota xpcshell tests in a child process as well; r=dom-workers-and-storage-reviewers,sg
For now, only test_listOrigins.js, test_originWithCaret.js and test_simpledb.js
can run in a child process because they don't need to set preferences or access
files in the profile directory.
We will be able to run more tests in a child process once we have SpecialPowers
for xpcshell implemented using JSProcessActors and when we expose the base
directory used by QuotaManager through a new QuotaManagerService method (to
avoid getting the profile directory using nsIDirectoryService because that
doesn't work in a child process).

Differential Revision: https://phabricator.services.mozilla.com/D75281
2020-05-14 15:35:29 +00:00
Jan Varga 3b74d7ea87 Bug 1624802 - Support running dom/quota xpcshell tests in a child process; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D75279
2020-05-14 15:27:38 +00:00
Jan Varga 6caab074de Bug 1624802 - Refactor tests in dom/quota/test; r=dom-workers-and-storage-reviewers,ttung
The refactoring consists of:
- moving tests into dedicated directories for given test type
  (browser, mochitest, xpcshell)
- replacing add_test with addTest in browser tests to share common setup code
- adding a way to synchronously load scripts in all test types by providing a
  path relative to the top level directory
- adding a way to explicitely run a mochitest inside a worker context
  (loadWorkerScript)
- removing the need to declare testGenerator in tests
- removing the need to set some common preferences in individual tests
- sharing common functions for:
  - system context (system.js)
  - content context (content.js)
  - browser tests (browser.js)
  - mochitest tests (mochitest.js)
  - xpcshell tests (xpcshell.js)
  - nested content test inside a browser test (nestedtest.js)
  - buffer/view/blob/file (file.js)

Differential Revision: https://phabricator.services.mozilla.com/D73149
2020-05-08 09:49:52 +00:00
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
Tom Tung 718c6d81f9 Bug 1633326 - Add an additional warning message that shows the file path when it fails to create a file; r=janv,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D72591
2020-04-27 08:38:55 +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
Simon Giesecke 2e68c75bb1 Bug 1626973 - Add assertions for result of MaybeUpdateSize. r=janv,dom-workers-and-storage-reviewers
Depends on D69580

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

--HG--
extra : moz-landing-system : lando
2020-04-03 16:16:50 +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 3d69caa161 Bug 1536796 - P6 - Changes on dom/quota unit test to verify the fix; r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D60872

--HG--
extra : moz-landing-system : lando
2020-04-01 07:52:33 +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
Tom Tung 4debe01abb Bug 1536796 - P1 - Introduce a flag (useDOSDevicePathSyntax) to nsILocalFileWin and a method (QM_NewLocalFile) to QuotaCommon; r=janv,dom-workers-and-storage-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D67873

--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
Jan Varga d371cf7402 Bug 1624880 - Fix quota/test/unit/upgrades tests when LSNG is disabled by default; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D68211

--HG--
extra : moz-landing-system : lando
2020-03-26 19:20:56 +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
Simon Giesecke 7e9a7de895 Bug 1620632 - Rename confusingly named types/macros for relocation handling of nsTArray. r=froydnj
Specifically, this renames
* nsTArray_CopyChooser to nsTArray_RelocationStrategy
* the Copy template argument of nsTArray_base to RelocationStrategy
* nsTArray_CopyWithConstructors to nsTArray_RelocateUsingMoveConstructor
* nsTArray_CopyWithMemutils to nsTArray_RelocateUsingMemutils
* DECLARE_USE_COPY_CONSTRUCTORS to MOZ_DECLARE_RELOCATE_USING_MOVE_CONSTRUCTOR

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

--HG--
extra : moz-landing-system : lando
2020-03-20 17:04:27 +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
Simon Giesecke 6223cfb160 Bug 1618121 - Make CheckedUnsafePtr a literal type and trivially copyable if checking is disabled, and add get member function. r=dom-workers-and-storage-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D64302

--HG--
extra : moz-landing-system : lando
2020-03-12 15:04:18 +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
Oana Pop Rus e07c2cf135 Backed out 2 changesets (bug 1618121, bug 1617993) for build bustages in CheckedUnsafePtr.h on a CLOSED TREE
Backed out changeset 2658800d6c78 (bug 1617993)
Backed out changeset 6e0a1c83694c (bug 1618121)
2020-03-12 16:59:41 +02:00
Simon Giesecke d29259a248 Bug 1618121 - Make CheckedUnsafePtr a literal type and trivially copyable if checking is disabled, and add get member function. r=dom-workers-and-storage-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D64302

--HG--
extra : moz-landing-system : lando
2020-03-12 13:48:18 +00:00
Narcis Beleuzu 02dfadf8c9 Backed out 2 changesets (bug 1618121, bug 1617993) for assertion failure at nsTArray.h . CLOSED TREE
Backed out changeset e4d228335a49 (bug 1617993)
Backed out changeset b874484bdeb7 (bug 1618121)
2020-03-12 11:40:00 +02:00
Simon Giesecke b118d306ad Bug 1618121 - Make CheckedUnsafePtr a literal type and trivially copyable if checking is disabled, and add get member function r=dom-workers-and-storage-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D64302

--HG--
extra : moz-landing-system : lando
2020-03-10 15:50:16 +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
Mark Banner 15cfe23b88 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-03-07 10:09:44 +00:00
Boris Zbarsky f31fe5e910 Bug 1619112 part 3. Pass UTF8 strings to MaybeRejectWithType/RangeError promise methods. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D65539

--HG--
extra : moz-landing-system : lando
2020-03-06 21:05:48 +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
Jan Varga e1fdbaccb4 Bug 1615552 - Enhance SimpleDB to support other persistence types; r=ttung,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D62058

--HG--
extra : moz-landing-system : lando
2020-02-27 13:46:43 +00:00
Tom Tung b578ccf77b Bug 1618483 - Have a test to ensure the behavior between QMS::ClearClient and localStorage; r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D64550

--HG--
extra : moz-landing-system : lando
2020-02-27 12:28: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
Jan Varga 0e36a593fa Bug 1615998 - QM: Remove nsIQuotaOriginsResult interface; r=ttung,dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D63051

--HG--
extra : moz-landing-system : lando
2020-02-22 01:03:26 +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
Jan Varga 29b9b41a82 Bug 1608759 - Forbid leaf common entries; r=ttung,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D62068

--HG--
extra : moz-landing-system : lando
2020-02-14 09:22:58 +00:00
Jan Varga 1ffac26af6 Bug 1608759 - Add "beforeInstall" key to package definitions; r=ttung,dom-workers-and-storage-reviewers
This is a preparation for "afterInitTemporaryStorage" key which requires initialized storage.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 09:23:24 +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
Jan Varga 4e80555e4f Bug 1608759 - Implement and use verifyStorage() function in all upgrade tests; r=dom-workers-and-storage-reviewers,ttung
The new verifyStorage() function takes current storage structure on disk and compares it with the expected structure. The expected structure is defined in JSON and consists of a per test package definition and a shared package definition. The shared package definition contains unknown files and directories which need to be ignored in all upgrade methods.
The new infrastructure for checking storage structure will be used later in other tests to verify handling of unknown or obsolete stuff for example during temporary storage initialization.

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

--HG--
extra : moz-landing-system : lando
2020-02-07 15:32:26 +00:00
Jan Varga 6f4faaf11f Bug 1608759 - installPackage() shouldn't allow file overwrites by default; r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D61449

--HG--
extra : moz-landing-system : lando
2020-02-07 15:29:24 +00:00
Daniel Varga 1c197e92da Backed out 2 changesets (bug 1608759) for causing lint failure
CLOSED TREE

Backed out changeset cb706e608d58 (bug 1608759)
Backed out changeset f2a08319ac10 (bug 1608759)

--HG--
extra : amend_source : 251fcc6d6304fe6a4ed240f6d1d409fc168f1c31
2020-02-07 17:23:36 +02:00
Jan Varga 469bf12cb7 Bug 1608759 - Implement and use verifyStorage() function in all upgrade tests; r=dom-workers-and-storage-reviewers,ttung
The new verifyStorage() function takes current storage structure on disk and compares it with the expected structure. The expected structure is defined in JSON and consists of a per test package definition and a shared package definition. The shared package definition contains unknown files and directories which need to be ignored in all upgrade methods.
The new infrastructure for checking storage structure will be used later in other tests to verify handling of unknown or obsolete stuff for example during temporary storage initialization.

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

--HG--
extra : moz-landing-system : lando
2020-02-07 14:58:38 +00:00
Jan Varga fc5548f510 Bug 1608759 - installPackage() shouldn't allow file overwrites by default; r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D61449

--HG--
extra : moz-landing-system : lando
2020-02-07 14:41:54 +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 c30d23c18d Bug 1608025 - Add a test for the upgrade from storage version 2.2; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D59711

--HG--
extra : moz-landing-system : lando
2020-01-14 06:17:09 +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 83c009bffd Bug 1608025 - Clean up the test for the upgrade from storage version 2.0; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D59709

--HG--
rename : dom/quota/test/unit/upgrades/test_version2_1upgrade.js => dom/quota/test/unit/upgrades/test_upgradeStorageFrom2_0.js
rename : dom/quota/test/unit/upgrades/version2_1upgrade_profile.zip => dom/quota/test/unit/upgrades/version2_0_profile.zip
extra : moz-landing-system : lando
2020-01-14 06:15:53 +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 48cc81bb25 Bug 1608025 - Clean up the test for the upgrade from storage version 0.0; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D59703

--HG--
rename : dom/quota/test/unit/upgrades/test_originAttributesUpgrade.js => dom/quota/test/unit/upgrades/test_upgradeStorageFrom0_0.js
rename : dom/quota/test/unit/upgrades/originAttributesUpgrade_profile.zip => dom/quota/test/unit/upgrades/version0_0_profile.zip
extra : moz-landing-system : lando
2020-01-14 02:53:39 +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 f8f9157438 Bug 1608025 - Clean up the test for the upgrade from flat origin directories; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D59664

--HG--
rename : dom/quota/test/unit/upgrades/idbSubdirUpgrade1_profile.zip => dom/quota/test/unit/upgrades/indexedDBDirectory_flatOriginDirectories_profile.zip
rename : dom/quota/test/unit/upgrades/idbSubdirUpgrade2_profile.zip => dom/quota/test/unit/upgrades/persistentStorageDirectory_flatOriginDirectories_profile.zip
rename : dom/quota/test/unit/upgrades/test_idbSubdirUpgrade.js => dom/quota/test/unit/upgrades/test_upgradeFromFlatOriginDirectories.js
extra : moz-landing-system : lando
2020-01-14 02:49:43 +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
Jan Varga efe95e9831 Bug 1608025 - Move storage upgrade related tests to a separate directory; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D59661

--HG--
rename : dom/quota/test/unit/defaultStorageUpgrade_profile.zip => dom/quota/test/unit/upgrades/defaultStorageUpgrade_profile.zip
rename : dom/quota/test/unit/idbSubdirUpgrade1_profile.zip => dom/quota/test/unit/upgrades/idbSubdirUpgrade1_profile.zip
rename : dom/quota/test/unit/idbSubdirUpgrade2_profile.zip => dom/quota/test/unit/upgrades/idbSubdirUpgrade2_profile.zip
rename : dom/quota/test/unit/localStorageArchive1upgrade_profile.zip => dom/quota/test/unit/upgrades/localStorageArchive1upgrade_profile.zip
rename : dom/quota/test/unit/localStorageArchive4upgrade_profile.zip => dom/quota/test/unit/upgrades/localStorageArchive4upgrade_profile.zip
rename : dom/quota/test/unit/localStorageArchiveDowngrade_profile.zip => dom/quota/test/unit/upgrades/localStorageArchiveDowngrade_profile.zip
rename : dom/quota/test/unit/morgueCleanup_profile.zip => dom/quota/test/unit/upgrades/morgueCleanup_profile.zip
rename : dom/quota/test/unit/obsoleteOriginAttributes_profile.zip => dom/quota/test/unit/upgrades/obsoleteOriginAttributes_profile.zip
rename : dom/quota/test/unit/originAttributesUpgrade_profile.zip => dom/quota/test/unit/upgrades/originAttributesUpgrade_profile.zip
rename : dom/quota/test/unit/storagePersistentUpgrade_profile.zip => dom/quota/test/unit/upgrades/storagePersistentUpgrade_profile.zip
rename : dom/quota/test/unit/test_defaultStorageUpgrade.js => dom/quota/test/unit/upgrades/test_defaultStorageUpgrade.js
rename : dom/quota/test/unit/test_idbSubdirUpgrade.js => dom/quota/test/unit/upgrades/test_idbSubdirUpgrade.js
rename : dom/quota/test/unit/test_localStorageArchive1upgrade.js => dom/quota/test/unit/upgrades/test_localStorageArchive1upgrade.js
rename : dom/quota/test/unit/test_localStorageArchive4upgrade.js => dom/quota/test/unit/upgrades/test_localStorageArchive4upgrade.js
rename : dom/quota/test/unit/test_localStorageArchiveDowngrade.js => dom/quota/test/unit/upgrades/test_localStorageArchiveDowngrade.js
rename : dom/quota/test/unit/test_morgueCleanup.js => dom/quota/test/unit/upgrades/test_morgueCleanup.js
rename : dom/quota/test/unit/test_obsoleteOriginAttributesUpgrade.js => dom/quota/test/unit/upgrades/test_obsoleteOriginAttributesUpgrade.js
rename : dom/quota/test/unit/test_obsoleteOrigins.js => dom/quota/test/unit/upgrades/test_obsoleteOrigins.js
rename : dom/quota/test/unit/test_originAttributesUpgrade.js => dom/quota/test/unit/upgrades/test_originAttributesUpgrade.js
rename : dom/quota/test/unit/test_storagePersistentUpgrade.js => dom/quota/test/unit/upgrades/test_storagePersistentUpgrade.js
rename : dom/quota/test/unit/test_version2_1upgrade.js => dom/quota/test/unit/upgrades/test_version2_1upgrade.js
rename : dom/quota/test/unit/version2_1upgrade_profile.zip => dom/quota/test/unit/upgrades/version2_1upgrade_profile.zip
rename : dom/quota/test/unit/version2_2upgrade_profile.zip => dom/quota/test/unit/upgrades/version2_2upgrade_profile.zip
extra : moz-landing-system : lando
2020-01-14 02:36:19 +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 88ce749554 Bug 1606318 - Enhance QM_FIRST_INITIALIZATION_ATTEMPT testing; r=asuth
Changes:
- use separate directory for testing of telemetry
- use separate zip packages
- test entire histogram snapshots (not just particular key)
- a test doesn't need to do own cleanup anymore
- general cleanup

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

--HG--
rename : dom/quota/test/unit/head.js => dom/quota/test/unit/head-shared.js
rename : dom/quota/test/unit/test_qm_first_initialization_attempt.js => dom/quota/test/unit/telemetry/test_qm_first_initialization_attempt.js
rename : dom/quota/test/unit/version2_0upgrade_profile.zip => dom/quota/test/unit/telemetry/version1_0_profile.zip
rename : dom/quota/test/unit/version2_1upgrade_profile.zip => dom/quota/test/unit/telemetry/version2_0_profile.zip
rename : dom/quota/test/unit/version2_2upgrade_profile.zip => dom/quota/test/unit/telemetry/version2_1_profile.zip
extra : moz-landing-system : lando
2019-12-31 02:26:27 +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
Chris Peterson 406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +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
Kris Maglione 94e3b0bd8d Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:16 +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 21f3d11a5b Bug 1474608 - P3 - Add a argument (aCallback) to deleteDataFromOriginAttributesPattern and add a browser test to verify the behavior on quota storage; r=asuth,baku
Differential Revision: https://phabricator.services.mozilla.com/D34325

--HG--
extra : moz-landing-system : lando
2019-12-10 10:03:34 +00:00