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

54 Коммитов

Автор SHA1 Сообщение Дата
Victor Porof b503616295 Bug 1561435 - Format toolkit/modules/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 2616392f26053ee376b9126fbca696de5d4bb15b
2019-07-05 11:15:43 +02:00
Ian Moody 57b82dd9be Bug 1544284 - toolkit/ automated ESLint no-throw-literal fixes. r=Standard8
Result of running:
$ mach eslint -funix toolkit/ | sed -Ee 's/:.+//' - | xargs sed -E \
    -e 's/throw ((["`])[^"]+\2);/throw new Error(\1);/g' \
    -e 's/throw ((["`])[^"]+\2 \+ [^ ";]+);/throw new Error(\1);/g' \
    -e 's/throw \(/throw new Error(/g' -i

...and then reverting a couple of places where comments were touched,
as well as changes to toolkit/components/ctypes/tests/unit/test_jsctypes.js
that required expectation changes to
toolkit/components/ctypes/tests/chrome/test_ctypes.xul

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

--HG--
extra : moz-landing-system : lando
2019-04-16 19:30:27 +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 d1705a170b Bug 1517456 - Remove remaining production code references to Task.jsm. r=florian
Differential Revision: https://phabricator.services.mozilla.com/D15646

--HG--
extra : moz-landing-system : lando
2019-01-04 08:41:49 +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
Kris Maglione c50886cf4e Bug 1480327: Part 2 - Modernize what's left of Log.jsm a bit. r=Mossop
MozReview-Commit-ID: H06rpiZuIEF

--HG--
extra : rebase_source : e10781ffdfaa264370ca95a720298dc3607a079b
2018-08-01 23:23:34 -07:00
Kris Maglione bf729d7e98 Bug 1480327: Part 1 - Get rid of most of Log.jsm. r=Mossop
MozReview-Commit-ID: JVKJtkLhCDS

--HG--
extra : rebase_source : 8b47dbfaa6f279901b99c93c26eee27f719b1d1d
2018-08-01 23:41:01 -07:00
Jim Chen 48885775a4 Bug 1452200 - 1b. Add template literal support to Log.jsm; r=markh
Make Log.jsm functions support tagged template literals. For example,
instead of |logger.debug("foo " + bar)| or |logger.debug(`foo ${bar}`)|,
you can now use |logger.debug `foo ${bar}`| (without parentheses).

Using tagged template literals has the benefit of less verbosity
compared to regular string concatenation, with the added benefit of
lazily-stringified parameters -- the parameters are only stringified
when logging is enabled, possibly saving from an expensive stringify
operation.

This patch also fixes a bug in BasicFormatter where consecutive tokens
are not formatted correctly (e.g. "${a}${b}").

MozReview-Commit-ID: 9kjLvpZF5ch

--HG--
extra : rebase_source : ccf4e9fae9fa9ea7581de82296035fcc736ca58e
2018-04-15 14:53:28 -04:00
Jim Chen 2eb44a3425 Bug 1452200 - 1a. Add AndroidAppender for Log.jsm; r=markh
Add an AndroidAppender that lets Log.jsm output to the Android logs,
using AndroidLog.jsm. Because the Android logging system keeps track of
the log metadata (time/level/name) separately from the log message, the
patch also adds a separate AndroidFormatter that does not prepend the
metadata to the log message itself.

MozReview-Commit-ID: C9oBbgVQOEc

--HG--
extra : rebase_source : eb1e8622b059ee45b574830426194ea35643b37c
2018-04-15 14:53:28 -04:00
Gurzau Raul bd326a2a6b Backed out 5 changesets (bug 1452200) for mochitest-chrome failures on Android on a CLOSED TREE
Backed out changeset ed07fb947b5e (bug 1452200)
Backed out changeset b03e9dc6ecd7 (bug 1452200)
Backed out changeset e4cdad2cd3d2 (bug 1452200)
Backed out changeset 8ac249bdc772 (bug 1452200)
Backed out changeset 225bb7ed5f71 (bug 1452200)
2018-04-15 09:19:04 +03:00
Jim Chen 7958b308d9 Bug 1452200 - 1b. Add template literal support to Log.jsm; r=markh
Make Log.jsm functions support tagged template literals. For example,
instead of |logger.debug("foo " + bar)| or |logger.debug(`foo ${bar}`)|,
you can now use |logger.debug `foo ${bar}`| (without parentheses).

Using tagged template literals has the benefit of less verbosity
compared to regular string concatenation, with the added benefit of
lazily-stringified parameters -- the parameters are only stringified
when logging is enabled, possibly saving from an expensive stringify
operation.

This patch also fixes a bug in BasicFormatter where consecutive tokens
are not formatted correctly (e.g. "${a}${b}").

MozReview-Commit-ID: 9kjLvpZF5ch

--HG--
extra : rebase_source : 41a4760f0f106ae9b7fb69342df3e28bc1cf1c20
2018-04-15 00:15:26 -04:00
Jim Chen 7358a84369 Bug 1452200 - 1a. Add AndroidAppender for Log.jsm; r=markh
Add an AndroidAppender that lets Log.jsm output to the Android logs,
using AndroidLog.jsm. Because the Android logging system keeps track of
the log metadata (time/level/name) separately from the log message, the
patch also adds a separate AndroidFormatter that does not prepend the
metadata to the log message itself.

MozReview-Commit-ID: C9oBbgVQOEc

--HG--
extra : rebase_source : 297410c894b998e4aff7b21ee442a7377e2ec500
2018-04-15 00:15:26 -04:00
Kris Maglione 7c36549516 Bug 1439181: Stop mangling stack traces in AOM errors. r=aswan
MozReview-Commit-ID: 6Nh4hwwvrWb

--HG--
extra : rebase_source : bc831473e6dd487716786ba5e51aeead05766771
2018-02-17 19:27:01 -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
Mark Hammond 26f95a81a1 Bug 1425987 - part 1: Add support to Log.jsm for managing log levels via prefs. r=Gijs
MozReview-Commit-ID: 6xLSnb0etnl

--HG--
extra : rebase_source : 7f6878b3296d3a513ae20a28d5ceb8fbbd84ea53
2017-12-18 17:48:41 +11:00
Mark Banner a34654023f Bug 1417940 - Change various instances of manually calling getService to use Services.jsm in toolkit/. r=mossop
MozReview-Commit-ID: 8eEhjFZc4mT

--HG--
extra : rebase_source : 10341495d85dae45f2efbe3af6ad11b0c0214104
2017-11-09 16:36:57 +00:00
Andreea Pavel d377351feb Backed out 1 changesets (bug 1417940) for failing browser-chrome browser/components/contextualidentity/test/browser/browser_aboutURLs.js r=backout on a CLOSED TREE
Backed out changeset 2c2f807e23b5 (bug 1417940)
2017-11-17 18:08:45 +02:00
Mark Banner 4831d3ed89 Bug 1417940 - Change various instances of manually calling getService to use Services.jsm in toolkit/. r=mossop
MozReview-Commit-ID: 8eEhjFZc4mT

--HG--
extra : rebase_source : fa73ef148c0ea38226e11824e683daab43f2c0b8
2017-11-09 16:36:57 +00: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
Florian Quèze 33d29ec112 Bug 1374282 - ban Task.jsm during startup, r=Mossop, a=sheriffduty 2017-06-22 12:51:43 +02:00
Masatoshi Kimura 3231cb3535 Bug 1372886 - Remove dead parameters from nsIConverterInputStream.init(). r=hsivonen
MozReview-Commit-ID: GliLHLsUWjt

--HG--
extra : rebase_source : 50d3f4680a498125ddf600b0d64f6740b0229f80
2017-06-17 19:30:09 +09: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
Jared Wein 43bac26d30 Bug 1331661 - Enable the 'quotes' rule for eslint and fix most of the errors with --fix. r=Gijs
MozReview-Commit-ID: 6tv0Z06CO4a

--HG--
extra : rebase_source : 014c0b04d8538dc5f15bc6dd4ed6bd220c55c5d4
2017-01-17 09:48:17 -06:00
Mark Banner 39df62d9dc Bug 1328338 - Fix more no-undef eslint issues in toolkit/ and browser/. r=mossop
MozReview-Commit-ID: 78dXLYVW1gC

--HG--
extra : rebase_source : 4d2c50697307177c76a71ca7989863f01b05290b
2017-01-03 11:55:24 +00: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
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
Jared Wein fd84c776c7 Bug 1292042 - Enable the keyword-spacing rule for eslint. Most of this patch was autogenerated by 'eslint --fix'. Files with .xml extension needed to be changed by hand due to limitations of custom plugin. r=markh
MozReview-Commit-ID: EMjJ3yWt9Wt

--HG--
extra : rebase_source : 2b8327e5a7cf0bfd190d696ad5fe475f13faa3cc
2016-08-04 03:28:58 -04:00
Dave Townsend 6e44ebad84 Bug 1257246: Update toolkit for eslint 2. r=Gijs
Most of this is fixing functions that in some cases return a value but then
can also run to completion without returning anything. ESLint 2 catches this
where previous versions didn't. Unless there was an obvious other choice I just
made these functions return undefined at the end which is effectively what
already happens.

MozReview-Commit-ID: KHYdAkRvhVr

--HG--
extra : rebase_source : 720cc9d864175248508146a7f4704b4bf3f02439
extra : histedit_source : 6cc0ecbf21a571e1a41d517b67512a3452fac19a
2016-04-05 11:33:48 -07:00
Dave Townsend e496a11771 Bug 1245649: Turn on no-extra-semi. r=markh
--HG--
extra : commitid : HReQFPDOA6x
extra : rebase_source : 303a92f511c3c9dd2d26135975d4dc7c85e823b3
2016-02-03 17:27:36 -08:00
Dave Townsend 76c0eab703 Bug 1229519: Fix toolkit/modules to pass eslint checks. r=mak
--HG--
extra : commitid : 9muV4FzxxCp
extra : rebase_source : 2d651bfb17cd89768cff1f62d2ee7550a9c2589d
extra : amend_source : 5a0584163aaec0534dab50a8cac8597b58214f24
2015-12-03 09:58:56 -08:00
Tooru Fujisawa 7ff6b0aae3 Bug 1207497 - Part 1: Remove use of expression closure from toolkit/, exept tests. r=Gijs
--HG--
extra : commitid : 7TOGiSg7KEL
extra : rebase_source : e6c1672e9b7e9d18aa4a430051789b5962c0ec14
2015-09-24 21:20:04 +09:00
Ravi Shankar fc99a1c828 Bug 1109608 - Log.stackTrace should use human-readable task stack traces if available. r=Yoric 2015-03-11 03:21:00 -04:00
Matthew Noorenberghe 7c1c30102f Bug 1072014 - Log.jsm: Allow logging of falsy arguments. r=Unfocused 2014-09-23 21:38:43 -07:00
Matthew Noorenberghe 8c234c3e50 Bug 1071870 - Log.jsm: Fix support for Log.Level.All in some services/ modules. r=markh 2014-09-23 21:38:34 -07:00
Benjamin Smedberg aa23f17657 Bug 1053836 - Fix subclassing of prefix loggers by only overriding the log() method, not all the other methods. This fixes `this` resolution in the Experiment log override, r=gps
--HG--
extra : rebase_source : fd81dc1a5aa15b4b1e57413991a787a463b42945
2014-08-14 16:30:54 -04:00
Chris Manchester af38d16c1f Bug 997364 - Make fileAppender chain promises on file creation.; r=irving 2014-05-16 19:45:04 -04:00
Irving Reid 30b56f1bef Bug 966674: #3 Add parameter substitution in log messages; r=gps,rnewman 2014-04-29 10:09:29 -04:00
Irving Reid c53a02f070 Bug 966674: #2 Move exceptionStr() and stackTrace() from utils.js to Log.jsm; r=gps,rnewman 2014-04-29 10:09:27 -04:00