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

1362 Коммитов

Автор SHA1 Сообщение Дата
Agi Sferro 8c6612b46b Bug 1738966 - Pass in argc, argv in GreOmniPath. r=kershaw,valentin
A call to InitCommandLine was added in Bug 1727180 where gArgc and gArgv are
not defined.

The same bug also re-enabled some tests that appeared to pass (but really they
were just silently crashing), this patch fixes that too.

Differential Revision: https://phabricator.services.mozilla.com/D130223
2021-11-03 16:31:06 +00:00
Kershaw Chang 34f9cb2633 Bug 1727180 - Call XRE_InitCommandLine for xpcshell, r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D124890
2021-11-02 16:01:10 +00:00
Jens Stutte 1a837fbe65 Bug 1731564: Use motivated SpinEventLoopUntil inside storage/*. r=janv
Depends on D127232

Differential Revision: https://phabricator.services.mozilla.com/D127233
2021-10-07 08:06:14 +00:00
Marian-Vasile Laza 18fb16c542 Backed out 18 changesets (bug 1731564) for causing build bustages on SpinEventLoopUntil. CLOSED TREE
Backed out changeset 0464dbdc8584 (bug 1731564)
Backed out changeset 0d996df13545 (bug 1731564)
Backed out changeset 5630a0e7a109 (bug 1731564)
Backed out changeset 37b41d187cdb (bug 1731564)
Backed out changeset d37700fa60b6 (bug 1731564)
Backed out changeset b0ce7db44b99 (bug 1731564)
Backed out changeset aa5ec3aa1535 (bug 1731564)
Backed out changeset 73b648f1fa70 (bug 1731564)
Backed out changeset bb8fb0f9833e (bug 1731564)
Backed out changeset 0d8905144f5d (bug 1731564)
Backed out changeset 2cfb094a1ec3 (bug 1731564)
Backed out changeset 78d3b0257a6a (bug 1731564)
Backed out changeset e9d32926e93c (bug 1731564)
Backed out changeset 874cab520ce5 (bug 1731564)
Backed out changeset d8071cc32bd9 (bug 1731564)
Backed out changeset 283c5393cbbc (bug 1731564)
Backed out changeset 317bc38e3de5 (bug 1731564)
Backed out changeset 53e3f4862439 (bug 1731564)
2021-10-07 00:09:19 +03:00
Jens Stutte 3d9442dbd4 Bug 1731564: Use motivated SpinEventLoopUntil inside storage/*. r=janv
Depends on D127232

Differential Revision: https://phabricator.services.mozilla.com/D127233
2021-10-06 19:45:16 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Greg Tatum d389d769f4 Bug 1719550 - Use Intl.Collator in test_locale_collation.js; r=platform-i18n-reviewers,nordzilla
This now uses JavaScript's standardized Intl.Collator.

Differential Revision: https://phabricator.services.mozilla.com/D121434
2021-08-10 16:01:18 +00:00
Greg Tatum 2684357ea1 Bug 1719550 - Unify collator in mozStorageService and SQLCollations; r=platform-i18n-reviewers,nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D121432
2021-08-10 16:01:18 +00:00
Greg Tatum ebe4dfeceb Bug 1719550 - Use mozilla::intl::Collator in the SpiderMonkey; r=anba,platform-i18n-reviewers,nordzilla
This patch attempts to directly wire the Intl.Collator implementation to the
mozilla::intl::Collator::Options bag. The only complexity that wasn't factored
out was the use of the locale keywords, which would invalidate the locale in
the current implementation.

Differential Revision: https://phabricator.services.mozilla.com/D120904
2021-08-10 16:01:15 +00:00
Narcis Beleuzu daed5248e2 Backed out 12 changesets (bug 1719550) for bustages on TestCollator.cpp . CLOSED TREE
Backed out changeset 3b2735a29138 (bug 1719550)
Backed out changeset 5e2019335244 (bug 1719550)
Backed out changeset 105676dd2d6f (bug 1719550)
Backed out changeset b4b0d58778e9 (bug 1719550)
Backed out changeset 3ef5792020bb (bug 1719550)
Backed out changeset 389a77da6ddc (bug 1719550)
Backed out changeset 48f39b5ef77f (bug 1719550)
Backed out changeset bd125cc5b9b4 (bug 1719550)
Backed out changeset a8b778ca2375 (bug 1719550)
Backed out changeset b14702168fb9 (bug 1719550)
Backed out changeset 7b46b5cc7424 (bug 1719550)
Backed out changeset 6b04162618a1 (bug 1719550)
2021-08-10 17:46:34 +03:00
Greg Tatum 62f050ecec Bug 1719550 - Use Intl.Collator in test_locale_collation.js; r=platform-i18n-reviewers,nordzilla
This now uses JavaScript's standardized Intl.Collator.

Differential Revision: https://phabricator.services.mozilla.com/D121434
2021-08-10 11:46:38 +00:00
Greg Tatum ee5176c26e Bug 1719550 - Unify collator in mozStorageService and SQLCollations; r=platform-i18n-reviewers,nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D121432
2021-08-10 11:46:37 +00:00
Greg Tatum 70467b0601 Bug 1719550 - Use mozilla::intl::Collator in the SpiderMonkey; r=anba,platform-i18n-reviewers,nordzilla
This patch attempts to directly wire the Intl.Collator implementation to the
mozilla::intl::Collator::Options bag. The only complexity that wasn't factored
out was the use of the locale keywords, which would invalidate the locale in
the current implementation.

Differential Revision: https://phabricator.services.mozilla.com/D120904
2021-08-10 11:46:35 +00:00
Florian Quèze ca7bbcc752 Bug 1720374 - Remove MOZ_GECKO_PROFILER ifdefs that are not useful, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119810
2021-07-15 22:04:23 +00:00
Tooru Fujisawa cc92ef732d Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Simon Giesecke 760cc7e936 Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert
- Add missing include directives and forward declarations.
- Remove some extra include directives.
- Add missing namespace qualifications.
- Move include directives out of namespace in toolkit/xre/GlobalSemaphore.h

Differential Revision: https://phabricator.services.mozilla.com/D98894
2021-03-25 10:19:44 +00:00
Simon Giesecke 613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Simon Giesecke b9621d6376 Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Jan Varga eeb8cf2781 Bug 1695883 - Add explicit fallible mozStorageTransaction::Start method for starting the transaction; r=dom-storage-reviewers,sg
The new method is mandatory because mozStorageTransaction constructor no longer
starts the transaction. It must be started explicitely.

All consumers have been adjusted, but only dom/quota, dom/indexedDB, dom/cache,
dom/localstorage and dom/storage handle the error. Other components like
netwerk/cache, netwerk/cookie and toolkit/components currently only warn on
failure to start a transaction. Bug 1696129, 1696130 and 1696133 have been
filed for proper handling of transaction start failures in those components.

Differential Revision: https://phabricator.services.mozilla.com/D106893
2021-03-04 04:38:06 +00:00
Jan Varga 117488daa2 Bug 1694231 - Add support for nested mozStorageTransaction using savepoints; r=dom-storage-reviewers,sg
The nesting level is tracked on the storage connection. The thread safety is
ensured by holding a lock while a transaction is being started/commited/rolled
back. For these purposes, the sharedDBMutex has been exposed on
mozIStorageConnection interface and additional helper methods have been added
to the interface as well.

Differential Revision: https://phabricator.services.mozilla.com/D106019
2021-03-03 18:53:14 +00:00
Jens Stutte 05581ddca4 Bug 1678330: Ensure nested SpinEventLoopUntil(OrShutdown) calls are traceable to the originating source in case of crash. r=nika,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106839
2021-03-02 22:11:58 +00:00
Cosmin Sabou b2eb620ed0 Backed out changeset 03cae7800b41 (bug 1678330) for mochitest plain failures on test_window_open_discarded_bc.html. CLOSED TREE 2021-03-02 20:18:21 +02:00
Jens Stutte a0af9ea0a4 Bug 1678330: Ensure nested SpinEventLoopUntil(OrShutdown) calls are traceable to the originating source in case of crash. r=nika,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106839
2021-03-02 15:15:20 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke 700d52dc1a Bug 1693541 - Improve uses of nsBaseHashtable and descendants by using Contains instead of Get in storage. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D106098
2021-02-24 12:49:55 +00:00
Simon Giesecke 661e25bf09 Bug 1692880 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-16 15:53:33 +00:00
Gerald Squelart 2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
smolnar 1afbbe67e1 Backed out 5 changesets (bug 1691894) for causing hazard failures in nsXULPrototypeCache. CLOSED TREE
Backed out changeset 22dc870ee609 (bug 1691894)
Backed out changeset 58c31e9d6ae3 (bug 1691894)
Backed out changeset 7483e84149d8 (bug 1691894)
Backed out changeset f977d6cfa973 (bug 1691894)
Backed out changeset db4503476f34 (bug 1691894)
2021-02-15 16:43:23 +02:00
Simon Giesecke 3c29a68440 Bug 1691894 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-15 10:04:46 +00:00
Simon Giesecke 916433bd5a Bug 1685111 - Extract CachingDatabaseConnection base class from indexedDB's DatabaseConnection. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D100922
2021-01-26 09:19:44 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke d10d03d076 Bug 1676365 - Move SpinEventLoopUntil to separate header. r=#xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96556

Depends on D96554
2020-11-23 16:10:41 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Simon Giesecke f355f05fec Bug 1673682 - Accept functors rather than a virtual function override in URLParams::Parse. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96428
2020-11-13 08:12:12 +00:00
Simon Giesecke 6206951895 Bug 1673682 - Move URLParams to nsURLHelper.h. r=valentin,necko-reviewers
Move ReadStructuredClone/WriteStructuredClone to URLSearchParams.

Adapt all uses of URLParams.

Differential Revision: https://phabricator.services.mozilla.com/D96416
2020-11-13 08:11:32 +00:00
Jan Varga 7deb1bd85a Bug 1676969 - Add escapeUTF8StringForLIKE; r=asuth,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96931
2020-11-13 02:16:00 +00:00
Jan Varga 581e5e418d Bug 1676806 - Follow-up fix for bug 1676573; r=asuth,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96820
2020-11-12 22:01:32 +00:00
Jan Varga 774bada3e2 Bug 1676573 - Add support for named in-memory databases; r=asuth,dom-workers-and-storage-reviewers
Naming in-memory databases also allows cloning which is the primary goal of
this patch.

Differential Revision: https://phabricator.services.mozilla.com/D96527
2020-11-11 07:26:41 +00:00
Simon Giesecke 938a174ee2 Bug 1639552 - Use NS_WARNING instead of sqlite3_log. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D94745
2020-10-29 10:14:37 +00:00
Simon Giesecke c5eb03f11f Bug 1639552 - Fix remaining clang-tidy diagnostics in ObfuscatingVFS. r=sylvestre,janv
Differential Revision: https://phabricator.services.mozilla.com/D78267
2020-10-29 10:14:24 +00:00
Simon Giesecke 1092c0da59 Bug 1639552 - Use ObfuscatingVFS if a URL containing a key is specified. r=dom-workers-and-storage-reviewers,mak,janv
Differential Revision: https://phabricator.services.mozilla.com/D76172
2020-10-29 10:13:59 +00:00
Simon Giesecke c29475654f Bug 1639552 - Register ObfuscatingVFS. r=dom-workers-and-storage-reviewers,mak,janv
Differential Revision: https://phabricator.services.mozilla.com/D76147
2020-10-29 10:13:46 +00:00
Simon Giesecke 2cd9c3bd8e Bug 1639552 - Integrate IPCStreamCipherStrategy into ObfuscatingVFS. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D76141
2020-10-29 10:13:13 +00:00
Simon Giesecke 80cee3b558 Bug 1639552 - Add obfuscating VFS. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D76140
2020-10-29 10:40:19 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Simon Giesecke ed0c4bbf24 Bug 1663924 - Split BorrowedStatement from CachedStatement. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D90234
2020-09-29 10:57:19 +00:00
Dave Townsend d41d51406e Bug 1657965: Remove expired async storage telemetry. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D86412
2020-09-28 16:47:51 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Nathan Froyd cfb8fb313f Bug 1662251 - stop assigning from NS_Convert* values, mostly; r=sg
This patch was generated by running:

```
perl -p -i \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF8toUTF16\((.*)\);/\1CopyUTF8toUTF16(\3, \2);/;' \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF16toUTF8\((.*)\);/\1CopyUTF16toUTF8(\3, \2);/;' \
     $FILE
```

against every .cpp and .h in mozilla-central, and then fixing up the
inevitable errors that happen as a result of matching C++ expressions with
regexes.  The errors fell into three categories:

1. Calling the convert functions with `std::string::c_str()`; these were
   changed to simply pass the string instead, relying on implicit conversion
   to `mozilla::Span`.
2. Calling the convert functions with raw pointers, which is not permitted
   with the copy functions; these were changed to invoke `MakeStringSpan` first.
3. Other miscellaneous errors resulting from over-eager regexes and/or the
   replacement not being type-aware.  These changes were reverted.

Differential Revision: https://phabricator.services.mozilla.com/D88903
2020-09-02 09:54:37 +00:00
Dave Townsend c9061686f8 Bug 1635489: Add telemetry on the status of sqlite database accesses. r=mak
Includes baddataDB.sqlite which is a copy of goodDB.sqlite but with what appears
to be the row count inflated beyond the end of the file. This causes loading the
database to succeed but queries to fail.

This increments a scalar for every database open and for every database query
where a query is the full execution of a statement from start to completion. If
a statement is re-used then the scalar will be incremented once for each use.

Differential Revision: https://phabricator.services.mozilla.com/D73938
2020-08-11 20:55:33 +00:00
Razvan Maries be21687a00 Backed out changeset af815754d58a (bug 1635489) for perma failures on test_statement_executeAsync.js. CLOSED TREE 2020-08-11 00:21:05 +03:00
Dave Townsend d49a4517e8 Bug 1635489: Add telemetry on the status of sqlite database accesses. r=mak
Includes baddataDB.sqlite which is a copy of goodDB.sqlite but with what appears
to be the row count inflated beyond the end of the file. This causes loading the
database to succeed but queries to fail.

This increments a scalar for every database open and for every database query
where a query is the full execution of a statement from start to completion. If
a statement is re-used then the scalar will be incremented once for each use.

Differential Revision: https://phabricator.services.mozilla.com/D73938
2020-08-10 20:09:27 +00:00
Simon Giesecke 96f3e7e019 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Noemi Erli 381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke 032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Magnus Melin a605833bc3 Bug 1654626 - fix crash in [@ mozilla::storage::Connection::ExecuteAsync]. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D84589
2020-07-23 21:38:52 +00:00
Marco Bonardo 60239c6b26 Bug 1652546 - Disable mozStorage exclusive lock fallback for file URIs. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D83636
2020-07-16 01:56:11 +00:00
Geoff Lankow 18668c950f Bug 1652630 - Fix variable redefinition to un-break the Thunderbird build r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D83447
2020-07-14 02:13:24 +00:00
Marco Bonardo 14784dc42d Bug 1650201 - Fix mozStorage prefs read before profile and fallback to a non-exclusive VFS when it can't get an exclusive lock. r=asuth,geckoview-reviewers,agi
mozStorage used to read prefs on service init, because they could only be read
on the main-thread. When service init was moved earlier, it started trying
to read prefs too early, before the profile was set up, thus it ended up always
reading the default value.

This patch moves the only relevant pref to mirrored StaticPrefs that can be accessed
from different threads, and removes two preferences that apparently are not necessary
(they have been broken from a long time) for now.
In particular, providing a global synchronous setting is a footgun, each consumer should
decide about their synchronous needs, rather than abusing a dangerous "go fast" setting.
The page size is something we don't change from quite some time, and it's unlikely to be
used to run experiments in the wild before doing local measurements first, for which Try
builds are enough.

The remaining exclusiveLock pref is a bit controversial, because in general exclusive lock
is better for various reasons, and mostly it is necessary to use WAL on network shares.
Though developers may find it useful for debugging, and some third parties are doing
dangerous things (like copying over databases) to work around it, for which it's safer to
provide a less dangerous alternative.
Note exclusive lock only works on Unix-derived systems for now (no Windows implementation).

Finally, this introduces a fallback to exclusive lock, so that if a third party is using our
databases, so that we can't get an exclusive lock, we'll fallback to normal locking.

Differential Revision: https://phabricator.services.mozilla.com/D82717
2020-07-10 21:45:53 +00:00
Kris Maglione b6be72f351 Bug 1649554: Part 1 - Move deprecated component registration helpers out of XPCOMUtils. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,whimboo,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81749
2020-07-10 23:58:30 +00:00
Kris Maglione 9d78661f88 Bug 1649221: Update ChromeUtils.generateQI callers to pass strings. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,agi,whimboo,Bebe,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81594
2020-07-10 23:58:28 +00:00
Kris Maglione 6a39211860 Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D81419
2020-07-09 21:42:25 +00:00
Csoregi Natalia b355fcc4bf Backed out 6 changesets (bug 1464542) for xpcshell failures on test_Services.js. CLOSED TREE
Backed out changeset b50af9005851 (bug 1464542)
Backed out changeset 9d3a0ea2cf65 (bug 1464542)
Backed out changeset 71c3475fcbc2 (bug 1464542)
Backed out changeset 51ff93220a95 (bug 1464542)
Backed out changeset e84de1547c09 (bug 1464542)
Backed out changeset bbecc16d08eb (bug 1464542)
2020-07-09 23:19:26 +03:00
Kris Maglione d09458dc51 Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D81419
2020-07-09 17:59:16 +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 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
Tom Tung 3e754f2b5c Bug 1645943 - Override xFullPathname to avoid the use of GetFullPathNameW; r=janv,asuth
Differential Revision: https://phabricator.services.mozilla.com/D80202
2020-06-24 16:08:45 +00:00
Haik Aftandilian 82ec0b2bdb Bug 1643491 - Check for cancellation in SQLITE_BUSY loop r=mak
Check for cancellation in SQLITE_BUSY loop and refactor SQLITE_BUSY handling to release/acquire mMutex only once.

Differential Revision: https://phabricator.services.mozilla.com/D78565
2020-06-09 19:47:53 +00:00
Simon Giesecke 810a23f6ad Bug 1620198 - Part 4: Remove mozIStorageAggregateFunction. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D65508
2020-06-08 10:00:31 +00:00
Simon Giesecke 3628030e06 Bug 1620198 - Part 3: Change type of FunctionInfo::function to nsCOMPtr<mozIStorageFunction>. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D65507
2020-06-08 10:00:24 +00:00
Simon Giesecke 4fa00c14c3 Bug 1620198 - Part 2: Remove FunctionInfo::type. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D65506
2020-06-08 10:00:14 +00:00
Simon Giesecke f3d8e02f37 Bug 1620198 - Part 1: Remove CreateAggregateFunction. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D65505
2020-06-08 09:59:57 +00:00
Ryan VanderMeulen 750150f551 Bug 1619522 - Upgrade to SQLite 3.32.1. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D76860
2020-05-29 14:18:09 +00:00
Emilio Cobos Álvarez 54fd961a29 Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin
There's no use case for stateful comparators, so they can be just plain
function pointers.

This is used in some hot places like CSS selector matching.

Differential Revision: https://phabricator.services.mozilla.com/D77084
2020-05-27 18:11:12 +00:00
Nathan Froyd 0541624397 Bug 1639658 - make AsyncExecuteStatements use mozilla::Runnable; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D76201
2020-05-20 18:41:28 +00:00
Simon Giesecke e6422e2afd Bug 1626570 - Remove obsolete copy enabling machinery. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D72176
2020-05-11 08:23:03 +00:00
Simon Giesecke d0816721e3 Bug 1626570 - Improve handling of copying arrays in storage/. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D73683
2020-05-06 11:54:36 +00:00
Simon Giesecke 2d8c4390b7 Bug 1628715 - Part 15: Replace MOZ_NONNULL_RETURN by returning NotNull<elem_type*>. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D71300
2020-04-24 13:35:27 +00:00
Andreas Farre 63e21eec70 Bug 1620594 - Part 1: Rework NS_ReleaseOnMainThreadSystemGroup. r=nika
To be able to remove SystemGroup, NS_ReleaseOnMainThreadSystemGroup
needs to have its dependency on SystemGroup removed. Since all
releases using SystemGroup would've released on the main thread anyway
we can safely replace NS_ReleaseOnMainThreadSystemGroup with
NS_ReleaseOnMainThread.

Depends on D64390

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:23 +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
Eric Rahm 12ca859e67 Bug 1626456 - Remove stray nsAutoPtr.h includes. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D69127

--HG--
extra : moz-landing-system : lando
2020-04-03 21:05:46 +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
Lina Cambridge 534fd0e715 Bug 1622949 - Add `HashPropertyBag::clone_from_bag`. r=froydnj
`clone_from_bag` lets Rust code create a thread-safe `HashPropertyBag`
from any kind of `nsIPropertyBag` by cloning its contents. This is
important when you want to use a property bag that's passed to an XPIDL
method off the main thread. An `nsIPropertyBag` passed from JS isn't
thread-safe, since it's cycle-collected, and its properties are
`XPCVariant`s. But a Rust `HashPropertyBag` is, because it's backed by
a non-cycle collected `nsHashPropertyBag`, and the only supported
properties are thread-safe storage variants.

It also marks `HashPropertyBag` as `Send + Sync`, given that the only
way to construct one is through `HashPropertyBag::new`, and
`VariantType` is only implemented for storage variants.

Finally, it adds more type tags for string (narrow and wide) variants,
and changes the `VariantType for nsCString` getter to use
`GetAsAUTF8String`, since that's what mozStorage implements for its
text variant, not `GetAsACString`.

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

--HG--
extra : moz-landing-system : lando
2020-03-17 23:33:45 +00:00
Simon Giesecke c2d3f05163 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in storage. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D65498

--HG--
extra : moz-landing-system : lando
2020-03-16 10:56:56 +00:00
Bogdan Tara c60fd3fdd2 Backed out 4 changesets (bug 1613985) for causing build bustages CLOSED TREE
Backed out changeset fba0caac746c (bug 1613985)
Backed out changeset 8605d7a19107 (bug 1613985)
Backed out changeset 41e858fbf235 (bug 1613985)
Backed out changeset 847433cf1e0a (bug 1613985)
2020-03-16 12:41:41 +02:00
Simon Giesecke 1bdb56207c Bug 1613985 - Use default for equivalent-to-default constructors/destructors in storage. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D65498

--HG--
extra : moz-landing-system : lando
2020-03-16 09:07:54 +00:00
Ed Lee acb960676c Bug 1620556 - Automatic code fixes for Prettier 1.19.1 upgrade. r=Standard8,remote-protocol-reviewers,marionette-reviewers,webcompat-reviewers,perftest-reviewers,sparky,whimboo,denschub
Differential Revision: https://phabricator.services.mozilla.com/D66128

--HG--
extra : moz-landing-system : lando
2020-03-13 23:38:52 +00:00
Cosmin Sabou 9ec8941cd4 Backed out 2 changesets (bug 1603703) for xpc failures on test_storage_aggregates.js. CLOSED TREE
Backed out changeset 05dbbf7c379f (bug 1603703)
Backed out changeset a1e723439116 (bug 1603703)

--HG--
extra : rebase_source : 65d834f15b63fdd0ce5c90d2efd080e4841777aa
2020-03-05 19:37:32 +02:00
Simon Giesecke 9e296ae57f Bug 1603703 - Part 2: Rename CreateFunction/RemoveFunction to RegisterFunction/UnregisterFunction. r=mak
Depends on D57089

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

--HG--
extra : moz-landing-system : lando
2020-03-05 15:14:56 +00:00
Simon Giesecke e6cae211c4 Bug 1603703 - Part 1: Change mozIStorageAsyncConnection::CreateFunction to accept a nsCOMPtr rather than a raw pointer. r=asuth,mak
Differential Revision: https://phabricator.services.mozilla.com/D57089

--HG--
extra : moz-landing-system : lando
2020-03-05 16:51:14 +00:00
Lina Cambridge 38a1672309 Bug 1613835 - Use a SQLite API call to check for in-progress transactions. r=mak
Previously, `mozIStorageConnection#transactionInProgress` returned true
only if a transaction was started via `beginTransaction()`. This meant
that manually executing `BEGIN`, as `Sqlite.jsm` and the Rust bindings
do, wouldn't accurately report if a transaction was in progress.
Similarly, the flag wasn't accurate in cases where SQLite automatically
rolled back a transaction.

Fortunately, SQLite provides the `sqlite3_get_autocommit()` function,
which we can use to determine if a transaction is open or not. This
commit refactors the `transactionInProgress` getter, along with all
`Connection` methods that depend on it, to use the SQLite API instead
of managing that state on the connection. `mozStorageTransaction` and
`Sqlite.jsm` still use their own flags to decide whether to commit
their transactions, for reasons explained in the IDL comment.

This commit also moves `transactionInProgress` to
`mozIStorageAsyncConnection`, so that `Sqlite.jsm` can use it, and
exposes it to Rust.

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

--HG--
extra : moz-landing-system : lando
2020-03-03 22:57:39 +00:00
shindli db1eff80fd Backed out 2 changesets (bug 1613835) for causing very frequent xpcshell failures in netwerk/test/unit/test_cookies_async_failure.js CLOSED TREE
Backed out changeset 4d2e14adc96b (bug 1613835)
Backed out changeset 61fb3c36ea92 (bug 1613835)
2020-03-03 20:44:17 +02:00
Lina Cambridge 99282e0bd7 Bug 1613835 - Use a SQLite API call to check for in-progress transactions. r=mak
Previously, `mozIStorageConnection#transactionInProgress` returned true
only if a transaction was started via `beginTransaction()`. This meant
that manually executing `BEGIN`, as `Sqlite.jsm` and the Rust bindings
do, wouldn't accurately report if a transaction was in progress.
Similarly, the flag wasn't accurate in cases where SQLite automatically
rolled back a transaction.

Fortunately, SQLite provides the `sqlite3_get_autocommit()` function,
which we can use to determine if a transaction is open or not. This
commit refactors the `transactionInProgress` getter, along with all
`Connection` methods that depend on it, to use the SQLite API instead
of managing that state on the connection. `mozStorageTransaction` and
`Sqlite.jsm` still use their own flags to decide whether to commit
their transactions, for reasons explained in the IDL comment.

This commit also moves `transactionInProgress` to
`mozIStorageAsyncConnection`, so that `Sqlite.jsm` can use it, and
exposes it to Rust.

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

--HG--
extra : moz-landing-system : lando
2020-03-03 15:24:06 +00:00
Sylvestre Ledru 7ba14f1431 Bug 1617369 - Reformat storage/variant/ using rustfmt r=lina
Depends on D64871

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

--HG--
extra : moz-landing-system : lando
2020-03-02 15:48:30 +00:00
Marco Bonardo b5b6473a6d Bug 1611386 - Drop support for --enable-system-sqlite. r=asuth,glandium
Differential Revision: https://phabricator.services.mozilla.com/D63177

--HG--
extra : moz-landing-system : lando
2020-02-20 22:16:03 +00:00