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

387 Коммитов

Автор SHA1 Сообщение Дата
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
Gijs Kruitbosch 9d274b2d2f Bug 1337794 - remove obsolete pagehide handling hacks from browser.js r=mconley
The pagehide handler has been as dead as a doornail for a while now,
but the side-effect of forcing the creation of an about:blank document
in non-remote windows was implicitly relied upon by some tests.

This removes the dead code and fixes up some tests.

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

--HG--
extra : moz-landing-system : lando
2018-09-04 17:55:05 +00: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
Nicholas Nethercote 60b1f563cb Bug 1447951 - Store nsDynamicAtom's chars after the end of the object. r=froydnj
This reduces memory usage because we only need one allocation instead of two
for the dynamic atom and its chars, and because we don't need to store a
refcount and a size. It precludes sharing of chars between dynamic atoms, but
we weren't benefiting much from that anyway.

This reduces per-process memory usage by up to several hundred KiB on my
Linux64 box.

One consequence of this change is that we need to allocate + copy in
DOMString::SetKnownLiveAtom(), which could make some things slower.

--HG--
extra : rebase_source : ba4065ea31e509dd985c003614199f73def0596c
2018-06-22 09:38:42 +10:00
Joel Maher 50b91c0a14 Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
Bogdan Tara 3287e1104c Merge inbound to mozilla-central. a=merge 2018-05-18 01:04:08 +03:00
Jan de Mooij 575aec161b Bug 1461677 - Rename compartment to realm in the memory reporting code. r=njn 2018-05-17 16:15:18 +02:00
Gabriele Svelto 5a541b79f4 Bug 1451005 - Add low commit-space event counts to the memory reporter; r=njn
MozReview-Commit-ID: 1jZwxj427tg

--HG--
extra : rebase_source : 5c5b674ef3094778c0e6aeb8d4abad146604be53
2018-05-16 13:58:10 +02: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
Nika Layzell f5f86c989e Bug 1444745 - Part 1: Clear out xptinfo and typelib to make way for the this patch, r=mccr8
Unfortunately, I wasn't able to figure out a way to make firefox build & run in
the intermediate stages of these commits. Because of this, I am going to just
delete most of the code which I am deleting in the first patch, as I figure that
those are somewhat uninteresting changes, and then make the other changes in the
following patches.

In total, the following things are deleted:
1. All of xpcom/typelib, except for `xpt/tools` - this directory is being
subsumed entirely into xpcom/reflect/xptinfo.
2. Most of the code in xpcom/reflect/xptinfo, it is being rewritten to avoid
allocating and contain all of the necessary data structures.
3. idl-parser's typelib.py XPT generator, as it will be replaced.
4. Most includes of files which have been deleted.

NOTE: xpcom/typelib/xpt/tools/xpt.py was not removed, as it is used by bundling
code & bundling tests, which we don't want to remove yet.
2018-04-17 19:20:50 -04:00
Nicholas Nethercote bac452f9ad Bug 1411469 - Statically allocate static atoms. r=froydnj
Currently static atoms are stored on the heap, but their char buffers are
stored in read-only static memory.

This patch changes the representation of nsStaticAtom (thus making it a
non-trivial subclass of nsAtom). Instead of a pointer to the string, it now has
an mStringOffset field which is a 32-bit offset to the string. (This requires
placement of the string and the atom within the same object so that the offset
is known to be small. The docs and macros in nsStaticAtom.h handle that.)

Static and dynamic atoms now store their chars in different ways: nsStaticAtom
stores them inline, nsDynamicAtom has a pointer to separate storage. So
`mString` and GetStringBuffer() move from nsAtom to nsDynamicAtom.

The change to static atoms means they can be made constexpr and stored in
read-only memory instead of on the heap. On 64-bit this reduces the per-process
overhead by 16 bytes; on 32-bit the saving is 12 bytes. (Further reductions
will be possible in follow-up patches.)

The increased use of constexpr required multiple workarounds for MSVC.
- Multiple uses of MOZ_{PUSH,POP}_DISABLE_INTEGRAL_CONSTANT_OVERFLOW_WARNING to
  disable warnings about (well-defined!) overflow of unsigned integer
  arithmetic.
- The use of -Zc:externConstexpr on all files defining static atoms, to make
  MSVC follow the C++ standard(!) and let constexpr variables have external
  linkage.
- The use of -constexpr:steps300000 to increase the number of operations
  allowed in a constexpr value, in order to handle gGkAtoms, which requires
  hashing ~2,500 atom strings.

The patch also changes how HTML5 atoms are handled. They are now treated as
dynamic atoms, i.e. we have "dynamic normal" atoms and "dynamic HTML5 atoms",
and "dynamic atoms" covers both cases, and both are represented via
nsDynamicAtom. The main difference between the two kinds is that dynamic HTML5
atoms still aren't allowed to be used in various operations, most notably
AddRef()/Release(). All this also required moving nsDynamicAtom into the header
file.

There is a slight performance cost to all these changes: now that nsStaticAtom
and nsDynamicAtom store their chars in different ways, a conditional branch is
required in the following functions: Equals(), GetUTF16String(),
WeakAtom::as_slice().

Finally, in about:memory the "explicit/atoms/static/atom-objects" value is no
longer needed, because that memory is static instead of heap-allocated.

MozReview-Commit-ID: 4AxPv05ngZy
2018-03-26 11:18:31 +02:00
Nicholas Nethercote 7ac2324679 Bug 1441430 - Provide more detail about atoms memory usage. r=froydnj
The old output had a single value: "atoms-table". The new output looks like
this:

> 649,904 B (00.39%) -- atoms
> ├──350,256 B (00.21%) -- dynamic
> │  ├──235,056 B (00.14%) ── unshared-buffers
> │  └──115,200 B (00.07%) ── atom-objects
> ├──212,992 B (00.13%) ── table
> └───86,656 B (00.05%) ── static/atom-objects

MozReview-Commit-ID: 924vUmxHAlh

--HG--
extra : rebase_source : 6c977546a69eeee62ebc87e335982e8278217484
2018-02-28 11:05:07 +11:00
Florian Quèze c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Nicholas Nethercote f76d17db0f Bug 529808 - Remove the static atom table. r=froydnj
Various atom-related things have improved recently.

- The main atom table is now threadsafe (bug 1275755) and so can be accessed on
  any thread. It has also been split into pieces (bug 1440824), which greatly
  reduces lock contention.

- A cache has been added to the HTML5 parser (bug 1352874) that removes the
  need for most of the full table lookups.

As a result, there is no point having a separate static atom table. This patch
removes it.

MozReview-Commit-ID: 8ou1BrnPAwd

--HG--
extra : rebase_source : 0c6ab073b1a20b703705582d28731a68456741e1
2018-02-28 07:34:12 +11:00
Steve Fink ae2642fca6 Bug 903519 - Tenure strings that are checked for in about:memory test, r=njn
--HG--
extra : rebase_source : fabf5fc33bbd2373289b91ac3b0661c4e2bf10f6
extra : source : 38f4e0426bdd81c0acdce3929e3e3d81370d1273
extra : histedit_source : e111269bf29f16b9ade69dcfaad281d210180b8d
2017-12-22 14:27:26 -08: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
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
Nicholas Nethercote 8bd05bfcc0 Bug 1412949 - Remove SystemMemoryReporter. r=erahm.
This was created for B2G and isn't really useful otherwise. It only works on
Linux, and it's behind the memory.system_memory_reporter pref, which is false
by default.

The patch also removes LinuxUtils.{h,cpp}, which is no longer used.

--HG--
extra : rebase_source : b97a018be11a79f83855a73b88020bfa86e60f78
2017-10-31 12:49:41 +11: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
Nicholas Nethercote 1aef116268 Bug 1401100 - Remove nsIMemoryReporterCallback. r=erahm.
nsIHandleReportCallback, typedef of nsIMemoryReporterCallback, has been the
preferred name for a long time and is used in most places. This patch removes
nsIMemoryReporterCallback.

--HG--
extra : rebase_source : c675076b4f98d93d96235dad890e31e0b0e6c277
2017-09-22 08:09:29 +10:00