Commit graph

152 commits

Author SHA1 Message Date
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
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
21236ee00f Bug 1481932 - Fully enable ESLint rule mozilla/reject-requires-await. r=mossop
MozReview-Commit-ID: 7pYfD6Ax5VX

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

--HG--
extra : moz-landing-system : lando
2018-08-11 07:27:35 +00: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 Banner
0722fe3ee3 Bug 1434869 - Automatically mark EXPORTED_SYMBOLS as used, so that we don't need to ignore it in ESLint's no-unused-vars rule. r=florian.
MozReview-Commit-ID: IVMeZHGdVBk

--HG--
extra : rebase_source : 0705e96256baf6dc82811297058aa1d820b2f119
2018-03-06 12:01:59 +00:00
Tom Ritter
c4edd2fe5c Bug 1435296 Address xpcshell test failures from increasing timer precision r=baku
See the comment on "Address test failures caused by bumping timer precision to 2 ms"
for more details.

MozReview-Commit-ID: LrsucEPdZIo

--HG--
extra : rebase_source : 8147c034f7dc93f678eebc80b0afabf55729d804
2018-02-12 11:41:38 -06: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
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
Mike Conley
4f1d95addb Bug 888784 - Remove FormHistory.getSchemaVersion and update some tests that used it to use add_task. r=mak
MozReview-Commit-ID: EQBksMqeNm2

--HG--
extra : rebase_source : 81e4a64cefce1352a7e34d855047ca9922132689
2017-11-30 17:00:07 -05:00
Narcis Beleuzu
a9239fc56d Backed out 14 changesets (bug 888784) for ESlint failure on /FormHistory.jsm. on a CLOSED TREE
Backed out changeset 8c3fc3cb35b7 (bug 888784)
Backed out changeset 4f1b033d3cc0 (bug 888784)
Backed out changeset 4f7816c12e0b (bug 888784)
Backed out changeset 456d0f3e4e34 (bug 888784)
Backed out changeset 5044e2244d17 (bug 888784)
Backed out changeset 8a44ddb5f2c2 (bug 888784)
Backed out changeset 9e70d1f4489e (bug 888784)
Backed out changeset a799d6cd42e4 (bug 888784)
Backed out changeset f33b9cc53b30 (bug 888784)
Backed out changeset dc3b1653e70c (bug 888784)
Backed out changeset 53cb7d7c71da (bug 888784)
Backed out changeset 5f88a6ef1aac (bug 888784)
Backed out changeset 291e111da6ef (bug 888784)
Backed out changeset b2682e434b20 (bug 888784)
2018-01-22 18:13:06 +02:00
Mike Conley
95819f2108 Bug 888784 - Remove FormHistory.getSchemaVersion and update some tests that used it to use add_task. r=mak
MozReview-Commit-ID: EQBksMqeNm2

--HG--
extra : rebase_source : 2f012bdb2b0cf996715be92fbbcb0e91e6434aee
2017-11-30 17:00:07 -05:00
Sebastian Hengst
157338c776 Backed out 9 changesets (bug 888784) for failing mochitest-bc browser_426329.js on Linux and on Android chrome's test_ext_browsingData_formdata.html and robocop's testFormHistory. r=backout on a CLOSED TREE
Backed out changeset 98722ab8c2f6 (bug 888784)
Backed out changeset d92599272745 (bug 888784)
Backed out changeset 67c58cb32ac9 (bug 888784)
Backed out changeset 46fb8f82f2bf (bug 888784)
Backed out changeset 73ad820d09ec (bug 888784)
Backed out changeset 18d185fa362e (bug 888784)
Backed out changeset 10c472d10264 (bug 888784)
Backed out changeset 51fb50c1ea68 (bug 888784)
Backed out changeset 80a207ed79ec (bug 888784)
2018-01-09 20:18:55 +02:00
Mike Conley
b2dbfe8731 Bug 888784 - Remove FormHistory.getSchemaVersion and update some tests that used it to use add_task. r=mak
MozReview-Commit-ID: EQBksMqeNm2

--HG--
extra : rebase_source : 68892eb791b2001532f2089f1f7fb277517a5027
2017-11-30 17:00:07 -05: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
Edouard Oger
39088f038f Bug 1404427 - Sync multiple form history deletions. r=kitcambridge
MozReview-Commit-ID: H7AmIBtFUOr

--HG--
extra : rebase_source : 5a33c4da86051bf3dfec56d878330a8d68b70870
2017-11-06 15:50:28 -05:00
Narcis Beleuzu
f7f473b678 Backed out 1 changesets (bug 1404427) for browser failures in browser_sanitize-timespans.js at some times of the day. r=backout a=backout on a CLOSED TREE
Backed out changeset e02d99be7eb0 (bug 1404427)
2017-11-11 05:48:15 +02:00
Edouard Oger
4f9b7d04fa Bug 1404427 - Sync multiple form history deletions. r=kitcambridge
MozReview-Commit-ID: H7AmIBtFUOr

--HG--
extra : rebase_source : 596e4470b64e9406432c4d54f7ef90138a032e62
2017-11-06 15:50:28 -05:00
Sebastian Hengst
e26417e1b1 Backed out changeset d9a7e2fba868 (bug 1404427) on suspicion of causing failures in browser_sanitize-timespans.js at some times of the day. r=backout a=backout on a CLOSED TREE 2017-11-10 15:28:16 +02:00
Edouard Oger
8ca003f520 Bug 1404427 - Sync multiple form history deletions. r=kitcambridge
MozReview-Commit-ID: H7AmIBtFUOr

--HG--
extra : rebase_source : 9d85cc401123eb915f640586e722c8275753066e
2017-11-06 15:50:28 -05:00
Andreea Pavel
1f2b7dccb6 Backed out changeset 6aa22b862a45 (bug 1404427) for failing browser-chrome browser/components/search/test/browser_426329.js r=backout on a CLOSED TREE 2017-11-09 21:26:40 +02:00
Edouard Oger
6af91eacb2 Bug 1404427 - Sync multiple form history deletions. r=kitcambridge
MozReview-Commit-ID: H7AmIBtFUOr

--HG--
extra : rebase_source : 8c232e95bb5849a60002f4572c113d814da4a193
2017-11-06 15:50:28 -05:00
Mark Banner
99e91ded27 Bug 1412893 - Change instances of using getService to Services.jsm where possible in toolkit/components - Part 2. r=florian
MozReview-Commit-ID: 44oBXPP88Lc

--HG--
extra : rebase_source : 6625ac73eca1fa63d474eda3d1146baf910eac8c
2017-10-30 17:22:17 +00:00
Edouard Oger
8cb437aed8 Bug 1395427 p2 - Include guid in formhistory-remove notifications. r=markh
MozReview-Commit-ID: Je0rV277d7

--HG--
extra : rebase_source : 0557db8a84c98b0fa55b6a4f23fa8001876d559b
2017-09-22 15:19:56 -04:00
Sebastian Hengst
dace60c516 Backed out changeset 553d26ab8ee8 (bug 1395427) 2017-09-27 17:10:26 +02:00
Edouard Oger
a532988296 Bug 1395427 p2 - Include guid in formhistory-remove notifications. r=markh
MozReview-Commit-ID: Je0rV277d7

--HG--
extra : rebase_source : f2b03b68567a8d075dfbe3921d14bcc86c755d66
2017-09-22 15:19:56 -04:00
Jonathan Guillotte-Blouin
c2a1a5026a Bug 1372427 - add "no-unused-vars" rule, with laxist variation in head_satchel + satchel_common. r=MattN
MozReview-Commit-ID: 9HBxDyUF01Q

--HG--
extra : rebase_source : 1c6dd4554708975817290bd624acde6aaf246c22
2017-06-15 16:39:50 -07:00
Jonathan Guillotte-Blouin
d99dbdf74f Bug 1372427 - enforce "comma-dangle". r=MattN
auto --fix

MozReview-Commit-ID: KKmDI0Pt43K

--HG--
extra : rebase_source : 4917dbfc35a03dc0f8171006273b1e555f7b4c9b
2017-06-14 17:46:42 -07:00
Jonathan Guillotte-Blouin
4e9c60eaf7 Bug 1372427 - add rule to not put spacing inside parens. r=MattN
auto --fix

MozReview-Commit-ID: 7jCl2Z0Q3SI

--HG--
extra : rebase_source : bd5d39a6332cc2cfd2110ef221c703e7adcdf169
2017-06-14 17:37:09 -07:00
Jonathan Guillotte-Blouin
098de3bdc2 Bug 1372427 - add rule to not put spacing inside arrays. r=MattN
auto --fix

MozReview-Commit-ID: BiEzl4OawuU

--HG--
extra : rebase_source : fe425f8840414ee289415e9b7775b698ee3b6b9a
2017-06-14 17:35:30 -07:00
Jonathan Guillotte-Blouin
940afb49f2 Bug 1372427 - enforce "var" declarations only at top-level. r=MattN
MozReview-Commit-ID: 1bzsOoyidnR

--HG--
extra : rebase_source : fa4ca6a5f23e8102a7fd3f7839ef75913a2664a8
2017-06-14 17:30:32 -07:00
Jonathan Guillotte-Blouin
9d800f76e8 Bug 1372427 - force radix argument in parseInt. r=MattN
MozReview-Commit-ID: J4VoeedZpGa

--HG--
extra : rebase_source : 5bb4dd6313c020ce86a6626e211d8c8953384a40
2017-06-14 13:38:17 -07:00
Jonathan Guillotte-Blouin
e09e7030e3 Bug 1372427 - add error to not pad blocks. r=MattN
auto --fix

MozReview-Commit-ID: 6tXXL7Ncmso

--HG--
extra : rebase_source : 54b8c38577cb97284dec2b43a18ba3c41cb06621
2017-06-14 13:28:01 -07:00
Jonathan Guillotte-Blouin
a09396282c Bug 1372427 - add rule to not throw litterals. r=MattN
MozReview-Commit-ID: F962Z4jhm2l

--HG--
extra : rebase_source : 3598a12db8721a7959b8253cd7e0659fa3b12371
2017-06-14 12:01:50 -07:00
Jonathan Guillotte-Blouin
59345808a2 Bug 1372427 - limit lines to a maximum of 100 chars. r=MattN
MozReview-Commit-ID: 3OSKaTMMBot

--HG--
extra : rebase_source : f6d9c00352003674c643089f158a8d116ae36a20
2017-06-13 16:48:31 -07:00
Jonathan Guillotte-Blouin
f4d5635b00 Bug 1372427 - add "dot-location" rule so that dots are on the same line as properties. r=MattN
MozReview-Commit-ID: A6IKfSiVXAN

--HG--
extra : rebase_source : 63be6025fee7a141e3169e2dffd7321e697edcc0
2017-06-13 16:34:54 -07:00
Jonathan Guillotte-Blouin
5a66b3e817 Bug 1372427 - add "block-scoped-var" rule. r=MattN.
MozReview-Commit-ID: K3Zwr0jy6U2

--HG--
extra : rebase_source : cca1893f0aabd2f80db757a6fe0429293eba88ce
2017-06-13 14:23:11 -07:00
Jonathan Guillotte-Blouin
92bcf669ee Bug 1372427 - add js-doc rule. r=MattN
MozReview-Commit-ID: YgDBHM88PW

--HG--
extra : rebase_source : 449ab51180fdebf2fa6e0b9b6c1ee659a15355dc
2017-06-13 10:48:52 -07:00
Jonathan Guillotte-Blouin
13ec30c445 Bug 1372427 - add semi-colon rule. r=MattN
auto --fix

MozReview-Commit-ID: F9GvxcghPkt

--HG--
extra : rebase_source : f88445b573583d50333249570aa80c3e2314b0c3
2017-06-13 09:51:07 -07:00
Jonathan Guillotte-Blouin
669e2f0d5e Bug 1372427 - Add indentation rules. r=MattN
MozReview-Commit-ID: 62a7RvVlcco

--HG--
extra : rebase_source : 6f2f81af33e14850ab72d64f9b2973f9f06bcfb6
2017-06-12 15:45:00 -07:00
Jonathan Guillotte-Blouin
03ac334e31 Bug 1372427 - Add "curly" eslint rule to fix missing curly braces. r=MattN.
MozReview-Commit-ID: LwVEPezNiCx

--HG--
extra : rebase_source : 69aa18e0e90dcf7559f0509dd40e746add0845ff
2017-06-09 15:56:08 -07:00
Jonathan Guillotte-Blouin
ddc7d26019 Bug 1371554 - Use Components.aliases where not used. r=mattn.
MozReview-Commit-ID: 8uElbXeSN3J

--HG--
extra : rebase_source : 08aaa02a2e62a83a88842f91eb913485aed869f6
2017-06-06 13:23:49 -07:00
Florian Quèze
97f401c644 Bug 1362882 - script-generated patch to switch from Promise.defer() to new Promise() where it's straightforward, rs=Mossop. 2017-05-12 14:55:27 +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 Queze
f935ddc4b3 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +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