Commit graph

59 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
4544dd42d7 Bug 1229519: Fix toolkit/components/satchel to pass eslint checks. r=dolske
--HG--
extra : commitid : 98MSbW7dPZG
extra : rebase_source : e27a1b61f49f5d8651151d91d3b6847ae7468955
extra : amend_source : 91482cefc5b0aedf83cd88578685f6ef4755545b
2015-12-03 10:01:41 -08: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
Tooru Fujisawa
3f9809017c Bug 1207498 - Part 2: Remove use of expression closure from tests in toolkit/components/. r=Gijs
--HG--
extra : commitid : J57uE7zSSsN
extra : rebase_source : b81cb1977b5beb9abc7cf132cd70648f406eb8ed
2015-09-24 20:36:01 +09:00
Tooru Fujisawa
816c72630a Backed out changeset 55b45f61cfd2 (bug 1207498) for Linux pgo M(oth) failure
--HG--
extra : commitid : 5g4QL4KrAot
2015-09-27 23:42:27 +09:00
Tooru Fujisawa
41ec522633 Bug 1207498 - Part 2: Remove use of expression closure from tests in toolkit/components/. r=Gijs
--HG--
extra : commitid : 1xymr2vWeyn
extra : rebase_source : 286757f28e8e392760d216f1b8bd25925ffe43b7
2015-09-24 20:36:01 +09:00
Gavin Sharp
4d947b6985 Re-land patches from bug 566746 and bug 697377 now that bug 851641 is addressed 2013-04-19 15:21:30 -07:00
Ryan VanderMeulen
048824e68e Backed out changeset 555f2b757639 (bug 566746, bug 697377) for intermittent Win7 mochitest b-c orange. 2013-05-02 21:20:08 -04:00
Gavin Sharp
1372a3cf1c Re-land patches from bug 566746 and bug 697377 now that bug 851641 is addressed 2013-04-19 15:21:30 -07:00
Ryan VanderMeulen
0021e7aaee Backed out 17 changesets (bug 566746, bug 697377) for frequent OSX debug mochitest-5 crashes. 2013-04-11 11:53:13 -04:00
Neil Deakin
f700a57efa Bug 566746, use improved callback api for asyncronous form history methods, r=mak 2013-04-11 04:01:49 -04:00
Neil Deakin
fd73347c56 Bug 566746 - Changes to shared form history tests files to support asynchronous form history, p=enndeakin,felix, r=mak 2013-04-11 04:01:47 -04:00
Gervase Markham
82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Wes Johnston
5466209ba9 Bug 725881 - Add a deleted form history table. r=dolske 2012-02-27 10:10:16 -08:00
Justin Dolske
beefc5ea64 Bug 506402 - Add GUIDs to satchel form entries. r=zpao, r=gavin 2010-04-13 15:18:31 -07:00
Justin Dolske
96a92e2d67 Bug 458812 - Remove support for importing from old mork-based formhistory.dat. r=vladimir 2009-12-13 17:04:41 -08:00