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

223 Коммитов

Автор SHA1 Сообщение Дата
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
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
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
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
Lina Cambridge 9d9b081407 Bug 1588329 - Introduce `mozIStorageAsyncConnection::variableLimit`. r=mak
This is a wrapper around the `sqlite3_limit` interface that returns the
binding parameter limit. Adding this getter lets us clean up the inline
`SQLITE_MAX_VARIABLE_NUMBER` constants scattered around Places.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 21:22:57 +00:00
Victor Porof 93517ce014 Bug 1561435 - Fix linting errors for storage/, r=standard8
# ignore-this-changeset

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

--HG--
extra : source : 79fe200fde95a459a3af42ce5818d09fbba2dbda
extra : intermediate-source : 6359e8b271dfe06430ac7f373ae14b72f1ede5da
2019-06-21 13:32:39 -07:00
Victor Porof 9eeaa5c80c Bug 1561435 - Format storage/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 77bfd37cea066708241ba39795e94f5ee4a06ff6
2019-07-05 10:59:24 +02:00
Boris Zbarsky 202f15eaec Bug 1552547 part 2. Stop using [array] in mozIStorageBindingParams. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D31659

--HG--
extra : moz-landing-system : lando
2019-05-20 16:30:12 +00:00
Boris Zbarsky f1f2d7ade1 Bug 1552547 part 1. Stop using [array] in mozIStorageAsyncConnection.executeAsync. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D31658

--HG--
extra : moz-landing-system : lando
2019-05-20 16:17:51 +00:00
Lina Cambridge 0cdebe20d7 Bug 1539104 - Add a way to detect supported storage connection operations. r=mak
In retrospect, overloading `Connection::connectionReady` to mean
"is ready _and_ supports this operation" wasn't a good idea. This
commit reverts that change (cfd44c936a9b), and adds two new methods:

* `Connection::operationSupported`, to check if a connection supports
  sync or async operations. This method is public.
* `Connection::ensureOperationSupported`, that asserts or returns an
  error if the connection doesn't support an operation. This is
  private.

`operationSupported` is used by callers like `Service::minimizeMemory`
to detect if the connection supports sync operations, since both sync
and async connections implement `mozIStorageConnection` now.

Finally, some callers used `!mDBConn` to check if the connection was
ready, while others used `connectionReady()`. This commit changes them
to use the latter.

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

--HG--
extra : moz-landing-system : lando
2019-04-02 18:49:21 +00:00
Mark Banner dba6983e75 Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23850

--HG--
extra : moz-landing-system : lando
2019-03-28 09:38:14 +00:00
Lina Cambridge 3e894ac30e Bug 1482608 - Add basic Rust bindings for mozStorage. r=nika,asuth,mak
This commit wraps just enough of the mozStorage API to support the
bookmarks mirror. It's not complete: for example, there's no way
to open, clone, or close a connection, because the mirror handles
that from JS. The wrapper also omits shutdown blocking and retrying on
`SQLITE_BUSY`.

This commit also changes the behavior of sync and async mozStorage
connections. Async (`mozIStorageAsyncConnection`) methods may be called
from any thread on any connection. Sync (`mozIStorageConnection`)
methods may be called from any thread on a sync connection, and from
background threads on an async connection. All connections now QI
to `mozIStorageConnection`, but attempting to call a sync method on
an async connection from the main thread throws.

Finally, this commit exposes an `OpenedConnection::unsafeRawConnection`
getter in Sqlite.jsm, for JS code to access the underlying connection.

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

--HG--
extra : moz-landing-system : lando
2019-03-25 04:49:18 +00:00
Kris Maglione e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Jan de Mooij 646dcf51d4 Bug 1506554 part 2 - Actually call cleanupLocaleTests in storage/test/unit/test_locale_collation.js. r=asuth
The cleanup function was there but never called, as far as I can see.

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

--HG--
extra : moz-landing-system : lando
2018-11-14 07:46:34 +00:00
Mark Banner ceaeb93550 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389

--HG--
extra : moz-landing-system : lando
2018-10-19 12:55:39 +00:00
Kris Maglione 53f96aa226 Bug 1486182: Part 2a - Add Services.catMan getter for the category manager. r=mossop
This makes it much easier to update existing consumers of
XPCOMUtils.enumerateCategoryEntries to use the category manager directly.

It also, unfortunately, requires updating existing category manager consumers
to use the Services getter in order to avoid ESLint errors.

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

--HG--
extra : rebase_source : fb9fd9b21db80af472ff6250a2e9a35e8d538147
2018-08-24 22:13:57 -07:00
Kris Maglione 3a5c05e76f Bug 1484496: Part 5e - Convert remaining nsISimpleEnumerator users to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3733

--HG--
extra : rebase_source : c0fac176d7b3d840c4dbb14f8d95ccfc7f83a5a8
extra : histedit_source : a92c40117d0808a3ad68c972f622a7a42c9ae8ba
2018-08-18 18:13:14 -07:00
Kris Maglione 356dd0de4a Bug 1484466: Part 3a - Update remaining XPCOMUtils.generateQI callers to use ChromeUtils. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3709

--HG--
extra : rebase_source : 650545d3e58ab92821a9ea2097793cca5996d5b3
2018-08-18 12:44:57 -07:00
Mark Banner fe1b5d201f Bug 1466497 - Enable ESLint rule require-expected-throws-or-rejects for storage/test/unit. r=mak
MozReview-Commit-ID: KZNpShBcfjJ

--HG--
extra : rebase_source : 8e11f26fe9d713bfc17e97f0fb4871bd9f3b0bad
2018-06-01 14:03:20 +01:00
Kris Maglione a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
Kit Cambridge 4b47270cdb Bug 1435446 - Reset executing statements on `SQLITE_BUSY` before retrying. r=mak
MozReview-Commit-ID: 9NtIJ49L8QR

--HG--
extra : rebase_source : 39ec7147911a68bebcae1281d276a431769adc1e
2018-02-23 19:50:38 -08:00
Kit Cambridge e4711b8178 Bug 1435446 - Add a default transaction type for storage connections. r=mak
This patch adds a `mozIStorageConnection::defaultTransactionType`
attribute that controls the default transaction behavior for the
connection. As before, `mozStorageTransaction` can override the default
behavior for individual transactions.

MozReview-Commit-ID: IRSlMesETWN

--HG--
extra : rebase_source : fc63af108bb246bc096cb9ef7c13b41fabba5563
2018-02-28 22:44:40 -08:00
Florian Quèze c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Jared Wein 9788800512 Bug 1436575 - Manually fix the errors from no-compare-against-boolean-literal that the autofix couldn't change. r=standard8
MozReview-Commit-ID: 6NtfU76sPKv

--HG--
extra : rebase_source : 143891b98995658a5683e01631eba9f6a2bb7b6f
2018-02-08 13:35:53 -05:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Florian Quèze 2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
Kris Maglione 918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione 6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Florian Quèze 22c55eb7b7 Bug 1421992 - Hand written cleanup patch to make tests pass after removing obsolete xpcshell functions. r=Gijs,ochameau a=Aryx 2017-12-21 11:11:57 +01:00
Florian Quèze 0f55cd45be Bug 1421992 - script-generated patch to replace do_execute_soon, do_print and do_register_cleanup with executeSoon, info and registerCleanupFunction, rs=Gijs. 2017-12-21 11:10:23 +01:00
Florian Quèze 032c961e0a Bug 1421992 - script-generated patch to replace do_check_* functions with their Assert.* equivalents, rs=Gijs. 2017-12-21 11:08:17 +01:00
Kit Cambridge f4136db758 Bug 1423820 - Copy temp entities after reattaching databases to a cloned storage connection. r=mak
MozReview-Commit-ID: illWRvUv3Y

--HG--
extra : rebase_source : eb4538fd4dd0ca2429c341864b8b1b1f761612c6
2017-12-06 22:34:18 -08:00
Mark Banner 41c7322062 Bug 1421968 - Fix more instances of .getService to use Services.jsm where possible. r=mossop
MozReview-Commit-ID: 2EbsWq7VPrI

--HG--
extra : rebase_source : 4e751a74b641b99b01af0947bf2eeaafb3fe8c62
2017-11-30 12:04:16 +00:00
Kit Cambridge 4dbde1745b Bug 1422383 - Clone temporary tables, views, and triggers when cloning a storage connection. r=mak
MozReview-Commit-ID: HwVMvvn7cui

--HG--
extra : rebase_source : 5acd3a9a3edbb0b1b844a76b7210d7b260762667
2017-11-30 19:21:10 -08:00
Andrew Sutherland 7f0823b2e1 Bug 1413501 - Test for SpinningSynchronousClose unregisterConnection edge-case. r=mak
--HG--
extra : rebase_source : fd275beb962ece0fc85765abfe7d28e6b88e887a
extra : source : 16a37706634172c5f07d81a2086b800af92146de
2017-11-08 09:31:31 -08:00
Mark Banner 4de6bf22b1 Bug 1411368 - Automatically fix no-multi-spaces issues raised when using ESLint 4. r=mossop
MozReview-Commit-ID: H5YVp3rnzGo

--HG--
extra : rebase_source : 5b45b6c0df834131812d094e975047eaad374e06
2017-10-26 11:47:01 +01:00
Ryan VanderMeulen 3d0158833d Merge autoland to m-c. a=merge 2017-08-24 20:20:08 -04:00
Marco Bonardo 7f569f98d9 Bug 1320301 - Add partial support to sqlite3_interrupt. r=asuth
MozReview-Commit-ID: V3ZjLEjqmT

--HG--
extra : rebase_source : 6f559b473c32dfcfb2bfe919c53199e202f7d636
2017-07-31 22:27:23 +02:00
Jan de Mooij 2cc6df95c3 Bug 1392554 - Port (Async)StatementParams to WebIDL bindings. r=asuth,qdot 2017-08-24 10:52:52 +02:00
Jan de Mooij 3912244f0b Bug 1390489 - Port StatementRow to WebIDL bindings. r=asuth,qdot 2017-08-22 09:25:37 +02:00
Florian Quèze 2924991bf6 Bug 1368456 - remove Promise.jsm imports in tests, r=mconley. 2017-06-23 11:25:52 +02:00
Florian Quèze 5b8f8b884c Bug 1374282 - script generated patch to remove Promise.defer calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00