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

102 Коммитов

Автор SHA1 Сообщение Дата
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
Marco Bonardo 08e5888d07 Bug 1519060 - Places maintenance doesn't properly replace malformed databases. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D16199

--HG--
extra : moz-landing-system : lando
2019-01-11 11:58:24 +00:00
Mark Banner b616e2a125 Bug 1517456 - Sqlite.jsm's executeTransaction no longer needs to handle generator functions. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D15645

--HG--
extra : moz-landing-system : lando
2019-01-04 08:41:35 +00:00
Mark Banner 691543ee89 Bug 1486739 - Add missing dangling commas in browser/, services/, taskcluster/ and toolkit/. r=mossop
Automatic changes by ESLint, except for manual corrections for .xml files.

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

--HG--
extra : moz-landing-system : lando
2018-08-31 05:59:17 +00:00
Thom Chiovoloni 59a4c043fe Bug 1442353 - Reuse timeoutPromise in Sqlite.jsm r=florian
MozReview-Commit-ID: 6AlvYliZcmy

--HG--
extra : rebase_source : f6fe5e2ce9c21b7414794675f9f19deaaa20baf6
2018-03-01 10:43:07 -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
Brian Grinstead 97119973ca Bug 1440094 - Remove imports to Console.jsm that only access the 'console' object;r=mossop
Importing this object is unnecessary after the updates to the WebIDL console from Bug 1425574
and the follow-ups blocking Bug 1430810. There are still callers that access Console.jsm
to create custom ConsoleAPI objects, but those will be handled separately.

MozReview-Commit-ID: 9ojFxtkpPId

--HG--
extra : rebase_source : 971bf99f709b8d2afe300f3693665724f747aa5e
2018-02-27 11:29:59 -08:00
Florian Quèze 682b1ec3b2 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01: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
Joshua Mengel, Bailey Hudson 235e231532 Bug 1423732 - Make Sqlite.jsm return an integer for getSchemaVersion. r=mak
MozReview-Commit-ID: KLJ7W3ZnmJU

--HG--
extra : rebase_source : 71e31421ba3f0256bb1996de1bfc9b9d6519f8e8
2018-01-23 23:16:32 -08:00
Zack Noyes, William Loughton 433b354f96 Bug 1407778 - Added `status` Error property on Sqlite.openConnection. r=mak
--HG--
extra : rebase_source : d352a15f8432583e1819cb2fad5e6efc9ea4cfd3
2018-01-23 23:11:54 -08:00
Kit Cambridge fe8e75daab Bug 1431149 - Add an optional schema name argument to `OpenedConnection#{get, set}SchemaVersion`. r=mak
MozReview-Commit-ID: 8Uk1Vuqc1lc

--HG--
extra : source : 410a941bdce8c11ec1da55d6cc541b93a93dda5c
2018-01-17 09:13:47 -08:00
Dorel Luca b715af06f1 Backed out changeset 410a941bdce8 (bug 1431149) for devtools failure on toolkit/components/passwordmgr/test/mochitest/test_basic_form_autocomplete.html
--HG--
extra : rebase_source : 379e1e754afcb89248fcf977f2ca9348c3584316
2018-01-18 18:50:04 +02:00
Kit Cambridge 1a46204e20 Bug 1431149 - Add an optional schema name argument to `OpenedConnection#{get, set}SchemaVersion`. r=mak
MozReview-Commit-ID: 8Uk1Vuqc1lc

--HG--
extra : rebase_source : 986fe36a97cdc375857c2ea8daf82554f37f0cd6
2018-01-17 09:13:47 -08:00
Dan Banner 7caa92d5d8 Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8
MozReview-Commit-ID: Jm8BRgt6mIv
2017-10-15 20:50:39 +01: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
Masatoshi Kimura 35399ee9fc Bug 1392070 - Stop using the StopIteration object in Sqlite.jsm. r=mak
MozReview-Commit-ID: BP3RuM5EweE

--HG--
extra : rebase_source : 1e0a6ba438e51a851013356faf84d8eb91ff78b6
2017-08-19 22:10:44 +09:00
Kris Maglione 0ecfcbc93e Bug 1388215: Part 3 - Use JIT-friendly defineLazy*Getters methods when defining many lazy imports. r=florian
MozReview-Commit-ID: APoFwUhDFdj

--HG--
extra : rebase_source : 15761873b91efaf1d338b6361bf7168ab4348e0d
2017-08-09 13:03:36 -07:00
Andrew McCreight eaeb65f509 Bug 1371844 - Add explicit API to set Debugging.failTestsOnAutoClose in Sqlite.jsm. r=mak
With JSM global sharing, the Debugging object is no longer a property
directly on the global of the Sqllite object. Instead of going through
this back door, add a setter method to Sqllite and use that.

MozReview-Commit-ID: HVCZ4Zb42q7

--HG--
extra : rebase_source : d54a0a143c2cd89a8543fd8b3f938abdbec96859
2017-05-25 15:40:55 -07:00
Florian Quèze 33d29ec112 Bug 1374282 - ban Task.jsm during startup, r=Mossop, a=sheriffduty 2017-06-22 12:51:43 +02:00
Marco Bonardo bac23ee9cb Bug 1364488 - Allow fetch to use a concurrent connection. r=standard8
MozReview-Commit-ID: 4L4PFtXsjsy

--HG--
extra : rebase_source : f12cbc4f9f6bb5cf9fc791c1c44978c98e3ca325
2017-05-17 15:51:02 +02:00
Florian Quèze 67e56b7404 Bug 1353542 - Add an eslint rule deprecating usage of Task.jsm in browser/ and toolkit/, r=Mossop. 2017-05-12 14:54:42 +02:00
Florian Quèze 4e937e42a2 Bug 1353542 - Cleanup the script output and fix tests, r=Mossop. 2017-05-12 14:54:05 +02:00
Florian Quèze 1d0e28a791 Bug 1353542 - script-generated patch to remove .bind(this) calls we no longer need now that generator functions have been replaced with async functions, r=Mossop. 2017-05-12 14:47:41 +02:00
Florian Quèze 5e3539e504 Bug 1353542 - massive script-generated patch converting Task.async and Task.spawn calls, and generators clearly identifiable as tasks, rs=Mossop. 2017-05-12 14:42:39 +02:00
Florian Quèze 2e2f358aa9 Bug 1353542 - pre-script hand-written cleanup patch, r=Mossop. 2017-05-12 14:41:20 +02:00
Florian Queze 37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Florian Queze 95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Marco Bonardo 13e5047247 Bug 1356284 - Avoid a not strictly needed but expensive concat in Sqlite.jsm::bindParam. r=florian
MozReview-Commit-ID: Kx1x4h5odsP

--HG--
extra : rebase_source : 1bfabbf6f8a96a50a647a2cb9599cea4f7145de9
2017-04-13 18:49:45 +02:00
Marco Bonardo f8239567d1 Bug 1336944 - Change Sqlite.jsm to bind TypedArrays as Blobs, not common Arrays. r=Gijs
Currently an Array is bound as a blob. Unfortunately this occupies the best javascript
code path to bind an array to an IN clause in the future.
We would like Arrays to bind to IN lists, while still keeping a nice interface to bind blobs.
This patch makes Uint8Array bind to blob, while Array is left available for future use.

MozReview-Commit-ID: 7xzumBs8JTe

--HG--
extra : rebase_source : e9f63f06892d9db801951243648eddd148646426
2017-02-06 19:30:19 +01:00
Ilya Gordeev e1c6fc3795 Bug 1247602 - Allow to bind blobs in Sqlite.jsm. r=mak
MozReview-Commit-ID: 2yPO6kidqfn

--HG--
extra : rebase_source : b17fcc66e2e0d27674aa16453e592cfd4f93a8a7
2016-02-19 14:24:54 +05:00
Jared Wein 9141469edf Bug 1326511 - Enable brace-style and no-multi-spaces eslint rules for toolkit. r=MattN
MozReview-Commit-ID: FuVu8skcqOe

--HG--
extra : rebase_source : 8ab34c4e46a7c3075b459bf44786ec184d10d203
2016-12-30 21:47:25 -05:00
Jared Wein ecab54a7c9 Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=MattN
MozReview-Commit-ID: 7E7LPorrEje

--HG--
extra : rebase_source : 0572a35415a766a3f31d266760ecd07f0dcc3f72
2016-12-29 18:34:54 -05:00
Wes Kocher 0dfb7c2b5c Backed out 3 changesets (bug 1325464) for xpcshell failures a=backout
Backed out changeset 562ddc32cc21 (bug 1325464)
Backed out changeset cd10db6087dd (bug 1325464)
Backed out changeset 4079437c4648 (bug 1325464)
2016-12-29 14:05:44 -08:00
Jared Wein 7255df4e9a Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=MattN
MozReview-Commit-ID: 8WoGr8i6oCR

--HG--
extra : rebase_source : da7172285d43b820421557ed3b05887e091ff939
2016-12-29 15:20:47 -05:00
Mark Banner 4f94e4bd68 Bug 1322343 - Enable no-unused-vars in the local scope in toolkit/.eslintrc.js. r=mossop
MozReview-Commit-ID: CiIsUjQzp4D

--HG--
extra : rebase_source : 1b98e88673625a52ef82c1fad5d56aec3e2e8e80
2016-11-09 22:06:32 +00:00
Kit Cambridge 8558928fe7 Bug 1322954 - Fix incorrect `instanceof` negations. r=markh
MozReview-Commit-ID: PgQmAu9hbQ

--HG--
extra : rebase_source : 376b83af517442cc05bc46ff7ca36e6ac46b06e2
2016-12-12 13:50:10 -08:00
Dave Townsend c5bb304fd9 Bug 1316882: Turn on space-before-function-paren eslint rule (toolkit). r=jaws
MozReview-Commit-ID: FGFwg6TYkvm

--HG--
extra : rebase_source : 4073cebbef1694393efe312aaafbdb803adbd304
2016-11-11 15:22:34 -08:00
Dave Townsend 0a2c8f9b78 Bug 1316882: Turn on space-infix-ops eslint rule. r=jaws
MozReview-Commit-ID: HBpjT2uHJaZ

--HG--
extra : rebase_source : 78fe71a1d673a1c698520a9c82c6f35959614f8f
2016-11-10 14:48:04 -08:00
Gijs Kruitbosch ae4301ef96 Bug 1285041 - ignore locking when trying to read chrome DB file, r=mak
MozReview-Commit-ID: 89f0YCxxgC8

--HG--
extra : rebase_source : 53efa0f0258728df54fc17a773cbf74c712b51e4
2016-07-18 16:46:45 +01:00
Phil Ringnalda 7287d4600d Backed out changeset ef7939c0332e (bug 1285041) for failures in test_storage_connection.js
CLOSED TREE
2016-09-15 20:04:30 -07:00
Gijs Kruitbosch fff8403f8a Bug 1285041 - ignore locking when trying to read chrome DB file, r=mak
MozReview-Commit-ID: 89f0YCxxgC8

--HG--
extra : rebase_source : be3ee58b00b4c8ae6ec41db9459f50abdce816f6
2016-07-18 16:46:45 +01:00