Commit graph

260 commits

Author SHA1 Message Date
Jonathan Kingston
3421b8fcff Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin
Replacing js and text occurences of asyncOpen2
Replacing open2 with open

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

--HG--
rename : layout/style/test/test_asyncopen2.html => layout/style/test/test_asyncopen.html
extra : moz-landing-system : lando
2019-02-12 16:08:25 +00:00
Myk Melez
25349d2601 Bug 1518283 - prohibit blank lines at the beginning and end of blocks (eslint padded-blocks) r=mossop,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D17526

--HG--
extra : moz-landing-system : lando
2019-01-30 17:26:25 +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
Jeff Walden
718bf761d4 Bug 1518263 - Use Intl.NumberFormat objects to format numbers in about:memory rather than hand-rolling formatting code or using toLocaleString that will create a fresh formatter object every time it's called. r=heycam 2019-01-07 12:05:55 -08:00
Cameron McCormack
9635af505d Bug 1517175 - Part 2: Add about:memory filter r=njn
Depends on D15628

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

--HG--
extra : moz-landing-system : lando
2019-01-07 03:04:46 +00:00
Cameron McCormack
81b8379a06 Bug 1517175 - Part 1: Omit "Other Measurements" section when empty r=njn
Differential Revision: https://phabricator.services.mozilla.com/D15628

--HG--
extra : moz-landing-system : lando
2019-01-07 03:04:44 +00:00
Cameron McCormack
af0862d439 Bug 1516831 - Add a process index to about:memory r=njn
Differential Revision: https://phabricator.services.mozilla.com/D15495

--HG--
extra : moz-landing-system : lando
2019-01-07 03:06:27 +00:00
Cameron McCormack
3ce3dcbe16 Bug 1517354 - Improve about:memory performance by not using toLocaleString r=njn
Differential Revision: https://phabricator.services.mozilla.com/D15627

--HG--
extra : moz-landing-system : lando
2019-01-07 02:50:05 +00:00
Eric Rahm
b9e275de1e Bug 1476371 - Normalize thread names in about:memory diffs. r=njn
This normalizes thread IDs (tid) to use the form 'tid=NNN'. It also
normalizes threadpool numbers, for example 'Foo #1 (tid=1234)' is
mapped to 'Foo #N (tid=NNN)'.

--HG--
extra : source : 2590832f34408f2ece66fb5d6a688d141d1df5bd
extra : amend_source : 4b2d4114fb94e871583e2c6461414aa6ba7d2dd7
2018-10-30 17:17:15 -07:00
Narcis Beleuzu
63a39ee873 Backed out changeset 2590832f3440 (bug 1476371) for Linting opt failrue on aboutMemory.js. CLOSED TREE 2018-10-31 21:08:22 +02:00
Eric Rahm
5817ebf336 Bug 1476371 - Normalize thread names in about:memory diffs. r=njn
This normalizes thread IDs (tid) to use the form 'tid=NNN'. It also
normalizes threadpool numbers, for example 'Foo #1 (tid=1234)' is
mapped to 'Foo #N (tid=NNN)'.

--HG--
extra : rebase_source : a476da4dd81a1a34ae12170da1008a98005adf62
2018-10-30 17:17:15 -07:00
Nicholas Nethercote
15dc34f5e1 Bug 1499906 (attempt 2) - Use template literals where suitable. r=erahm
--HG--
extra : rebase_source : 2b22e5875f4881d93f7dcab32f38f54dd52b3eef
2018-10-19 15:11:43 +11:00
Nicholas Nethercote
10d9fc7170 Bug 1499906 (attempt 2) - Put some parameters in aFoo form. erahm
--HG--
extra : rebase_source : 3fd1b18909b24ace1a76031ff46931fbb2d574d9
2018-10-19 15:11:41 +11:00
Nicholas Nethercote
2fc8cc6806 Bug 1499906 (attempt 2) - Use String.prototype.padStart(). r=erahm
--HG--
extra : rebase_source : 33797e2b53f0dece8b7684a5ff203b8bc31c5571
2018-10-19 15:11:39 +11:00
Nicholas Nethercote
49c8d5a3ea Bug 1499906 (attempt 2) - Use toLocaleString(). r=erahm
--HG--
extra : rebase_source : f00fdff317ac9964eb71743ba4407d4d580b4565
2018-10-19 15:11:36 +11:00
Nicholas Nethercote
535292ae85 Bug 1499906 (attempt 2) - Change var to let. r=erahm
--HG--
extra : rebase_source : e11be23b19088eb9b6179e236acc0f3eed40671c
2018-10-19 15:09:46 +11:00
Nicholas Nethercote
291b2825be Bug 1499906 (attempt 2) - Use for..of loops where possible. r=erahm
--HG--
extra : rebase_source : 24441f0e916f17e623d24dacbc650989231bef17
2018-10-19 15:09:46 +11:00
Nicholas Nethercote
4504f6da92 Bug 1499906 (attempt 2) - Improve treeline handling. r=erahm.
--HG--
extra : rebase_source : 58eb1bbd658cf268fdff8da4f5e17a8603610e07
2018-10-19 15:09:46 +11:00
Nicholas Nethercote
d6b23c42da Bug 1499906 (attempt 2) - Use non-ASCII chars directly in the code. r=erahm
--HG--
extra : rebase_source : 13aa1cace50aa109d397e54e82503454cb525a6e
2018-10-19 15:09:41 +11:00
Noemi Erli
7ace7a0df2 Backed out 8 changesets (bug 1499906) for ES Lint failure in builds/worker/checkouts/gecko/toolkit/components/aboutmemory/content/aboutMemory.js
Backed out changeset 81ed2232fb09 (bug 1499906)
Backed out changeset a4e7eb7be03c (bug 1499906)
Backed out changeset eeea7ba794c3 (bug 1499906)
Backed out changeset 9819dbed2d88 (bug 1499906)
Backed out changeset 97348d7aa09e (bug 1499906)
Backed out changeset 075198910378 (bug 1499906)
Backed out changeset 14cef5ef3dc4 (bug 1499906)
Backed out changeset 9d2fa6237585 (bug 1499906)
2018-10-19 06:00:48 +03:00
Nicholas Nethercote
63cb243205 Bug 1499906 - Use template literals where suitable. r=erahm
--HG--
extra : rebase_source : d5bc0fb14584077e5aa3dfda4f9aa4d770d60972
2018-10-19 11:27:37 +11:00
Nicholas Nethercote
c18a4882ef Bug 1499906 - Put some parameters in aFoo form. erahm
--HG--
extra : rebase_source : 5e815dd97ec90aff24670dbb005031cef903bbb5
2018-10-19 11:27:34 +11:00
Nicholas Nethercote
fcf04335f0 Bug 1499906 - Use String.prototype.padStart(). r=erahm
This lets us remove pad().

--HG--
extra : rebase_source : 1fec9bae018fd9a8dece94f5e5f851068a5305e0
2018-10-19 11:27:30 +11:00
Nicholas Nethercote
352b12fba0 Bug 1499906 - Use toLocaleString(). r=erahm
This replaces a bunch of code that inserted separators by hand.

For now I've kept the output mostly the same by forcing the locale to en-US.
But at least now we could consider localizing the output.

The places where the output is different, it's more consistent with the new
code. E.g. printing "-05.55%" (which matches "05.55%") instead of "-5.55%".

--HG--
extra : rebase_source : 7c7161e5ab07e55e514020070bdfa4a774644a53
2018-10-19 11:19:32 +11:00
Nicholas Nethercote
e97d37ffe2 Bug 1499906 - Change var to let. r=erahm
For consistency; `let` is used in most places.

--HG--
extra : rebase_source : cee8822832139e25d25790983122542fb87685a9
2018-10-19 10:59:34 +11:00
Nicholas Nethercote
90eb249086 Bug 1499906 - Use for..of loops where possible. r=erahm
--HG--
extra : rebase_source : 4e036df67656d11639edd1f0426596c8805aa569
2018-10-19 10:59:34 +11:00
Nicholas Nethercote
0978d2e6ca Bug 1499906 - Improve treeline handling. r=erahm.
This commit reduces the appendTreeElements2's treeline arguments from 3 to 2,
and makes the code easier to understand. It's also more efficient, because a
concatenation that used to be repeated for every child of a node is now done
once for all children.

This commit also shortens treeline variable names, because there are a lot of
them and they're easier to read when short.

--HG--
extra : rebase_source : 0fa942468b8ddc23506759b2040266d0c60ade14
2018-10-18 19:40:17 +11:00
Nicholas Nethercote
e0d2474114 Bug 1499906 - Use non-ASCII chars directly in the code. r=erahm
They're easier to read than \uXXXX escapes, and there's no reason to stick to
ASCII in the source code.

--HG--
extra : rebase_source : c3412c6a4060de6ea007b6758d1d9f2663efa6be
2018-10-18 19:39:38 +11:00
Margareta Eliza Balazs
ffea0ab6ab Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-31 12:27:44 +03:00
Nicholas Nethercote
f65957c65b Bug 1486486 - Remove bogus link override code in about:memory. r=bz
It's throwing because things like `about:memory#end0` aren't valid selectors.

--HG--
extra : rebase_source : 7de7b57347a7bc5dc3b08c58c31a48dc8be93804
2018-08-31 12:35:44 +10: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
Boris Zbarsky
6e84b66899 Bug 1476145 part 6. Stop using getInterface(nsIDOMWindowUtils) in toolkit. r=mossop
This is not quite a mechanical change, because some places have a .top or
whatnot snuck in there, so please review carefully!
2018-07-24 19:47:42 -04:00
Jared Wein
a60c9c7e00 Bug 1456617 - Remove empty rulesets from aboutMemory.css. r=Gijs
MozReview-Commit-ID: 7jQFTt0cAFu

--HG--
extra : rebase_source : 941e4b62b6165d320c0425da877bd2f341843511
2018-04-24 13:10:18 -07:00
Paul Bone
ba14455b5f Bug 1443396 - Use colours that contrast well on about:memory r=jaws,snorp
The about:memory page specified some colours using constants and others
using variables whose values can change.  If those variables changed, for
example due to the desktop toolkit using a dark theme, then it could create
poor contrast with the constants in these CSS files (desktop & mobile).

This change ensures that only the Mozilla system colour extensions and
Mozilla colour preference extensions colours are used.  Creating
fore/back-ground combinations that hopefully contrast well regardless of the
desktop theme.

--HG--
extra : rebase_source : f916aac0bb07c3a75ab45ece3fd58d1cdcf8bf46
extra : source : a78bc7ff3de5a0ea4aea060731253fed63a59d00
2018-04-23 12:40:09 +10: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 Banner
4de6bf22b1 Bug 1411368 - Automatically fix no-multi-spaces issues raised when using ESLint 4. r=mossop
MozReview-Commit-ID: H5YVp3rnzGo

--HG--
extra : rebase_source : 5b45b6c0df834131812d094e975047eaad374e06
2017-10-26 11:47:01 +01: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
Rajesh Kathiriya
48e6bc2124 Bug 1374620 - Enabled the ESLint dot-notation rule across mozilla-central r=standard8
MozReview-Commit-ID: FadrI2li43G

--HG--
extra : rebase_source : b455e846ab79c8141150517e67e542e3e06d630e
2017-07-25 23:45:41 +05:30
Sebastian Hengst
804a36e668 Backed out changeset f5922a7ed25a (bug 1374620) for failing eslint at telemetry/tests/unit/test_TelemetrySend.js:358: ["os"] is better written in dot notation. r=backout 2017-07-31 14:44:34 +02:00
Rajesh Kathiriya
22dfa54ef4 Bug 1374620 - Enabled the ESLint dot-notation rule across mozilla-central r=standard8
MozReview-Commit-ID: FadrI2li43G

--HG--
extra : rebase_source : 5992bdde34bcc2421350433bc8c1e498a6bba848
2017-07-25 23:45:41 +05:30
Andrew McCreight
ef2442e781 Bug 1373057 - Normalize script source counts in about:memory diffs. r=erahm
We care about the memory used by these scripts, not by the precise
count of them.
2017-06-14 15:36:00 -04:00
Florian Queze
f935ddc4b3 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Sebastian Hengst
738d097aae Backed out changeset 55f3df15eaa6 (bug 1356569) 2017-04-14 23:39:17 +02:00
Florian Queze
3c564a2b02 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00