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

59 Коммитов

Автор SHA1 Сообщение Дата
Lina Cambridge 19557885f6 Bug 1572615 - Abort bookmark merges that take longer than 5 minutes. r=markh
This commit introduces a new `Watchdog` class that signals an abort,
either after a delay or at shutdown, and wires up the buffered engine
to use it.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 18:48:25 +00:00
Victor Porof 9d673f1f0f Bug 1561435 - Format services/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 073567e8ded785e46382ba7e402d8da939a69d7b
2019-07-05 10:58:22 +02:00
Rob Wu 1af4c55c01 Bug 1544834 - Replace non-test uses of deprecated Array generics r=evilpie,dao
- `Array.forEach` becomes for-of loop or `array.forEach`.
- `Array.slice(a)` or `Array.slice(a, 0)` becomes `Array.from(a)`.
- `Array.map` becomes `Array.from`
- `Array` copy + concatenation becomes Array literal + spread syntax.
- All other `Array.X(a, ...)` become `Array.prototype.X.call` or `Array.from(a).X(...)`

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

--HG--
extra : moz-landing-system : lando
2019-04-17 19:03:17 +00:00
Barret Rennie 48cd738b02 Bug 1536170 - Replace all usage of Async.yieldingIterator with Async.yieldingForEach r=tcsc
Differential Revision: https://phabricator.services.mozilla.com/D26593

--HG--
extra : moz-landing-system : lando
2019-04-15 19:26:18 +00:00
Barret Rennie 46fd11fd0d Bug 1536170 - Replace Async.jankYielder r=tcsc,markh,eoger
`Async.jankYielder` is known to, unfortunately, cause jank by creating a lot of
immediately resolved promises that must be then GCed. For a collection of 50
items, it will create 50 promises and 49 of them will immediately resolve.

Instead of `Async.jankYielder`, we now have `Async.yieldState`, which simply
keeps track of whether or not the caller should yield to the event loop. Two
higher level looping constructs are built on top of it:

* `Async.yieldingIterator`, which has been rewritten to not create extraneous
  promises; and
* `Async.yieldingForEach`, which is a replacement for awaiting
  `Async.jankYielder` in a loop. Instead, it accepts the loop body as a
  function.

Each of these can share an instance of an `Async.yieldState`, which allows an
object with multiple loops to yield every N iterations overall, instead of
every N iterations of each loop, which keeps the behaviour of using one
`Async.jankYielders` in multiple places.

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

--HG--
extra : moz-landing-system : lando
2019-04-17 03:00:35 +00:00
Csoregi Natalia 7af4153e81 Backed out 3 changesets (bug 1536170) for xpcshell failures on test_bookmark_repair.js. CLOSED TREE
Backed out changeset e41b319d7243 (bug 1536170)
Backed out changeset 0d8c58e90773 (bug 1536170)
Backed out changeset 19c23f03b471 (bug 1536170)
2019-04-13 00:39:14 +03:00
Barret Rennie f584c090db Bug 1536170 - Replace all usage of Async.yieldingIterator with Async.yieldingForEach r=tcsc
Differential Revision: https://phabricator.services.mozilla.com/D26593

--HG--
extra : moz-landing-system : lando
2019-04-12 19:07:26 +00:00
Barret Rennie 27e15849d2 Bug 1536170 - Replace Async.jankYielder r=tcsc,markh,eoger
`Async.jankYielder` is known to, unfortunately, cause jank by creating a lot of
immediately resolved promises that must be then GCed. For a collection of 50
items, it will create 50 promises and 49 of them will immediately resolve.

Instead of `Async.jankYielder`, we now have `Async.yieldState`, which simply
keeps track of whether or not the caller should yield to the event loop. Two
higher level looping constructs are built on top of it:

* `Async.yieldingIterator`, which has been rewritten to not create extraneous
  promises; and
* `Async.yieldingForEach`, which is a replacement for awaiting
  `Async.jankYielder` in a loop. Instead, it accepts the loop body as a
  function.

Each of these can share an instance of an `Async.yieldState`, which allows an
object with multiple loops to yield every N iterations overall, instead of
every N iterations of each loop, which keeps the behaviour of using one
`Async.jankYielders` in multiple places.

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

--HG--
extra : moz-landing-system : lando
2019-04-12 19:07:00 +00:00
Noemi Erli aa44fadac3 Backed out 3 changesets (bug 1536170) for xpcshell failures in test_bookmark_duping.js CLOSED TREE
Backed out changeset 57c26f8e0bf7 (bug 1536170)
Backed out changeset ccea2e827d9d (bug 1536170)
Backed out changeset 51a67bffd7d2 (bug 1536170)
2019-04-11 23:05:24 +03:00
Barret Rennie 1a53df3674 Bug 1536170 - Replace all usage of Async.yieldingIterator with Async.yieldingForEach r=tcsc
Differential Revision: https://phabricator.services.mozilla.com/D26593

--HG--
extra : moz-landing-system : lando
2019-04-11 18:40:02 +00:00
Barret Rennie e46873db47 Bug 1536170 - Replace Async.jankYielder r=tcsc,markh,eoger
`Async.jankYielder` is known to, unfortunately, cause jank by creating a lot of
immediately resolved promises that must be then GCed. For a collection of 50
items, it will create 50 promises and 49 of them will immediately resolve.

Instead of `Async.jankYielder`, we now have `Async.yieldState`, which simply
keeps track of whether or not the caller should yield to the event loop. Two
higher level looping constructs are built on top of it:

* `Async.yieldingIterator`, which has been rewritten to not create extraneous
  promises; and
* `Async.yieldingForEach`, which is a replacement for awaiting
  `Async.jankYielder` in a loop. Instead, it accepts the loop body as a
  function.

Each of these can share an instance of an `Async.yieldState`, which allows an
object with multiple loops to yield every N iterations overall, instead of
every N iterations of each loop, which keeps the behaviour of using one
`Async.jankYielders` in multiple places.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 18:39:43 +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
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
Carol Ng eaa5aa23b5 Bug 1435000 - Refactor client engine queue to use AsyncQueueCaller r=eoger
MozReview-Commit-ID: JRWHktfqGMQ

--HG--
extra : rebase_source : ac39e2ff9fb1aa2bc10504aad5f018114902145e
2018-05-29 14:30:22 -04: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
Mark Hammond 00c0357e61 Bug 1442443 - remove all event loop spinning from Async.js. r=eoger
MozReview-Commit-ID: 9Sc9kfx47yU

--HG--
extra : rebase_source : e663727b1ed00ae931ef051a99268a04a756dfb8
2018-03-02 10:20:18 +11:00
Thom Chiovoloni e4c2bf7278 Bug 1440334 - (part 1) Add an iterator wrapper to services-common/async.js that uses a jankYielder for you r=kitcambridge
MozReview-Commit-ID: 3a8FeBqzmGC

--HG--
extra : rebase_source : 0aa699bd5cc5e84d10344c8d8db83b6551e2d0a4
2018-02-22 13:19:16 -05: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
Edouard Oger 81b643a035 Bug 633062 p1 - Introduce AsyncQueueCaller and AsyncObserver. r=markh
MozReview-Commit-ID: GGuSkA5DZUQ

--HG--
extra : rebase_source : 54446d6d3758c17e2ce7423a4684f8cd35d052c5
2018-01-04 18:06:57 -05:00
Noemi Erli 9df7ea51ac Backed out 8 changesets (bug 633062) as requested by eoger on a CLOSED TREE
Backed out changeset 590656f7b5c5 (bug 633062)
Backed out changeset 0888aa122056 (bug 633062)
Backed out changeset 0780cf391c52 (bug 633062)
Backed out changeset 9798cbd03027 (bug 633062)
Backed out changeset 4b31c73a585f (bug 633062)
Backed out changeset 0a8866062136 (bug 633062)
Backed out changeset 20ff83289564 (bug 633062)
Backed out changeset 5e52125316e1 (bug 633062)
2018-01-31 22:09:30 +02:00
Edouard Oger b8b1fbbf52 Bug 633062 p1 - Introduce AsyncQueueCaller and AsyncObserver. r=markh
MozReview-Commit-ID: GGuSkA5DZUQ

--HG--
extra : rebase_source : 54446d6d3758c17e2ce7423a4684f8cd35d052c5
2018-01-04 18:06:57 -05:00
Andreea Pavel 2ebbd41c08 Backed out 8 changesets (bug 633062) for failing xpcshell on Windows at services/sync/tests/unit/test_hmac_error.js on a CLOSED TREE
Backed out changeset b4e9cd0d61ab (bug 633062)
Backed out changeset ee294cebe485 (bug 633062)
Backed out changeset 3d1ad6b3bbee (bug 633062)
Backed out changeset c053f43da9e8 (bug 633062)
Backed out changeset 549e1282ae8e (bug 633062)
Backed out changeset 35058a83dab0 (bug 633062)
Backed out changeset 2e9dc98eabf0 (bug 633062)
Backed out changeset dbbacd08392c (bug 633062)
2018-01-31 10:07:34 +02:00
Edouard Oger a99869ed33 Bug 633062 p1 - Introduce AsyncQueueCaller and AsyncObserver. r=markh
MozReview-Commit-ID: GGuSkA5DZUQ

--HG--
extra : rebase_source : 496d90945ec2e6d41f5751d26cf87a14458961bb
2018-01-04 18:06:57 -05:00
Dorel Luca 9f8b519dae Backed out 8 changesets (bug 633062) for xpcshell failures on browser/extensions/formautofill/test/unit/test_sync.js on a CLOSED TREE
Backed out changeset d60ca66f2b62 (bug 633062)
Backed out changeset d80494d5bc36 (bug 633062)
Backed out changeset 33f832b59e86 (bug 633062)
Backed out changeset 968db19986aa (bug 633062)
Backed out changeset a55a3647ea49 (bug 633062)
Backed out changeset bb1030bdab48 (bug 633062)
Backed out changeset 9c4cd2a6965c (bug 633062)
Backed out changeset 669c76bd2618 (bug 633062)

--HG--
extra : amend_source : cf95d15507de46de393cdef797a5808c4e0407ff
2018-01-31 07:28:06 +02:00
Edouard Oger 139cd14eb0 Bug 633062 p1 - Introduce AsyncQueueCaller and AsyncObserver. r=markh
MozReview-Commit-ID: GGuSkA5DZUQ

--HG--
extra : rebase_source : 496d90945ec2e6d41f5751d26cf87a14458961bb
2018-01-04 18:06:57 -05: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
Luciano I e4007fdbe7 Bug 1375223 - Remove Async.querySpinningly. r=kitcambridge
MozReview-Commit-ID: bMo1jyIY5g

--HG--
extra : rebase_source : ac69fde2cb8216300bdb9e7d19528c15cdceb7c8
2017-10-31 18:50:31 -04: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
Edouard Oger 0943c36687 Bug 1210296 part 1 - Remove most event loop spinning from Sync. r=kitcambridge,markh,tcsc
MozReview-Commit-ID: 9RpgSgXykWt

--HG--
extra : rebase_source : 834df5b9b38a8332885a6c488f64215b550cad33
2017-06-05 18:50:07 -04:00
Nathan Froyd 27c58cf89f Bug 1372670 - part 3 - add spinEventLoopUntil to nsIThreadManager; r=erahm,florian 2017-06-21 12:59:28 -04: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
Jared Wein 65605f286e Bug 1330014 - Add .eslintrc.js file to /services and run eslint --fix to automatically fix most of the errors. --fix brings the error count down from 4083 to 321 errors. r=markh,standard8
MozReview-Commit-ID: EjyAssqiQk8

--HG--
extra : rebase_source : cbfc8d4474b6c3d46eb21374e33fd3341403444f
2017-01-10 12:09:02 -05:00
Iris Hsiao 55313b4bc9 Backed out changeset 7e0a0bd74199 (bug 1330014) 2017-01-13 11:06:43 +08:00
Jared Wein 81cb5e57b9 Bug 1330014 - Add .eslintrc.js file to /services and run eslint --fix to automatically fix most of the errors. --fix brings the error count down from 4083 to 321 errors. r=markh,standard8
MozReview-Commit-ID: EjyAssqiQk8

--HG--
extra : rebase_source : d783829bc7fced3044d0d076c4786a6957d29bb6
2017-01-10 12:09:02 -05:00
Mark Hammond 9c1b1b298b Bug 1317587 - don't start scheduled sync after shutdown. r=rnewman
MozReview-Commit-ID: GSyWAUa1qyr

--HG--
extra : rebase_source : 45d0dfd5c686803f017230ab6152d0204a3d4c8e
2016-11-15 15:28:52 +11:00
Thom Chiovoloni 6625026d42 Bug 655722 - Rewrite _buildGUIDMap in the sync bookmark engine to use PlacesUtils.promiseBookmarksTree. r=mak
MozReview-Commit-ID: BfcVQEldK6M

--HG--
extra : transplant_source : %21%E4%10%19n%F3%86m%A5%C8%28u%E7q%8E%F8KX/%D4
2016-04-05 16:42:10 -07:00
Hector Zhao 0067cc1e04 Bug 1242965 - Make services/common eslintable. r=rnewman 2016-01-28 15:42:16 +08:00
Tooru Fujisawa 17d87da8ac Bug 1217077 - Remove for-each from services/. r=gps
--HG--
extra : commitid : Fyer74kcwGc
2015-10-19 03:52:58 +09:00
Carsten "Tomcat" Book 08997000eb Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE
Backed out changeset 647025383676 (bug 1202902)
Backed out changeset d70c7fe532c6 (bug 1202902)
2015-10-07 14:03:21 +02:00
Carsten "Tomcat" Book e7ef778c9d Backed out 1 changesets (bug 1202902) for causing merge conflicts to mozilla-central
Backed out changeset cfc1820361f5 (bug 1202902)

--HG--
extra : rebase_source : 5d3db72337754bc7ab0ed0c30b2896100411ff92
2015-10-07 12:13:45 +02:00
Shu-yu Guo d06b6030f6 Bug 1202902 - Scripted fix the world. 2015-10-06 14:00:31 -07:00
Mark Hammond a061eb73d6 Bug 1195603 - prevent Sync from blocking app shutdown. r=rnewman 2015-08-31 11:57:25 +10:00
Gijs Kruitbosch 57f1d898a3 Bug 1166406 - use Object.create in sync code, r=rnewman
--HG--
extra : rebase_source : 4b7915d265d0433bbbea2d74ed3e512a3d90be72
2015-05-19 19:45:29 +01:00