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
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
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
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
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
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
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
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
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
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
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
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