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

3876 Коммитов

Автор SHA1 Сообщение Дата
Markus Stange 11931d38d5 Bug 1462784 - Merge GC and CC categories into one category. r=njn
They're very similar as far as most users of the profiler are concerned, I'd
say, and I don't believe it's worth giving them two different colors in the
activity graphs.

MozReview-Commit-ID: HTqjp56naL3

--HG--
extra : rebase_source : f172424042fab18a514201ba4b6c67c03c209cdb
2018-05-18 17:23:33 -04:00
Steve Fink 0680fed494 Bug 1464266 - Rename GCForReason to NonIncrementalGC, r=jonco
--HG--
extra : topic : GCForReason
extra : rebase_source : e81bf7bb8ca0824f8b63f25a46ccbe26c4002325
2018-05-24 16:19:18 -07:00
Masayuki Nakano 9ac857639c Bug 1460509 - part 1: Declare NS_ERROR_EDITOR_DESTROYED error code and add a check method to TextEditRules whether it can keep handling edit action at a moment r=m_kato
This patch defines NS_ERROR_EDITOR_DESTROYED error code as an editor module
specific error code.

And creates TextEditRules::CanHandleEditAction() to check if the instance
can keep handling edit action.

MozReview-Commit-ID: 4qECwNBO0yz

--HG--
extra : rebase_source : a925a9b6840d4d06e2792b9fe276e062288b0806
2018-04-24 15:23:01 +09:00
Kris Maglione 8340513b0c Bug 1463287: Add QueryInterface helper macro for concrete class types. r=bz
Using concrete class types with static IIDs in QueryInterface methods is a
pretty common pattern which isn't supported by any existing helper macros.
That's lead to separate ad-hoc implementations, with varying degrees of
dodginess, being scattered around the tree.

This patch adds a helper macro with a canonical (and safe) implementation, and
updates existing ad-hoc users to use it.

MozReview-Commit-ID: HaTGF7MN5Cv

--HG--
extra : rebase_source : ace930129d85960d22bc3048ca3bb19bbbd4a63e
extra : histedit_source : 03a87f746d957789d41381e4e1bfcc4fd7eebaf2%2C9c5bae9feeeef7721105db67be0f83e0ded66bb7
2018-05-21 16:33:18 -07:00
Bogdan Tara 3287e1104c Merge inbound to mozilla-central. a=merge 2018-05-18 01:04:08 +03:00
Cosmin Sabou 30476522a7 Merge mozilla-central to inbound. a=merge 2018-05-17 18:36: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
Raymond FOrbes bcb2d49204 Bug 1460929 - code coverage no longer use _exit on exit r=marco
MozReview-Commit-ID: HtI4hC97dOK

--HG--
extra : rebase_source : 95dccf7e490f9c873a181a7024e4145d55c02185
2018-05-11 15:53:22 -07:00
Adam Gashlin 22530d5691 Bug 1451366: Part 1 - Wait after launch from update and restart, r=mhowell, jimm 2018-05-14 14:43:36 -07: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
Gabriele Svelto 67a43f4a6a Bug 1451005 - Forward all memory-pressure events to the child processes; r=njn
When memory-pressure events were first used in an e10s environment it was
to implement memory minimization from about:memory. However when low memory
detection was first introduced in Firefox OS an issue arised with this scheme:
every process was using a kernel-based low-latency mechanism to detect low
memory scenarios and send memory-pressure events; but the main process events
were also being forwarded to all child processes causing listeners to be
triggered twice. Because of this -no-forward events were introduced and used.
Currently however low-memory is detected via polling, so there will always be
a significant delay between the beginning of the low-memory scenario and its
detection. Because of this there is no value in having content processes poll
on their own and it's best to have only the main process do it and then
forward the memory-pressure events to all child processes.

MozReview-Commit-ID: AMQOsEgECme

--HG--
extra : rebase_source : 1b408b31dd27940981407f50f2e5f07e354b16d7
2018-05-12 01:21:13 +02:00
Gabriele Svelto e2c126f409 Bug 1451005 - Introduce a timer-based poller for detecting low-memory scenarios; r=dmajor,njn
This patch introduces a new polling mechanism to detect low-memory scenarios.
The timer fires at a relatively slow pace and stops whenever the user stops
interacting with Firefox to avoid consuming power needlessly. The polling rate
is up to 3 orders of magnitude slower than the current tracker and is
throttled when memory is running low. It also doesn't suffer from data races
that were possible with existing tracker.

Contrary to the old available memory tracker which relied on a
Windows-specific mechanism, this one could be made to work on other platforms
too. The current implementation only supports Windows 64-bit builds though.

MozReview-Commit-ID: CFHuTDqjPbL

--HG--
extra : rebase_source : 92d1f801cc680f9fde8ecfa46c570e3c562a3d01
2018-05-17 14:48:02 +02:00
Peter Van der Beken ddfc4b6022 Bug 1452981 - Remove qsObjectHelper. r=bz.
--HG--
extra : rebase_source : f87d70c72bd720cd57377b4b70fdf8ecec590086
2018-05-02 11:47:02 +02:00
Nika Layzell c9d0fe3dd2 Bug 1455217 - Part 1: Add an explicit Promise type to xpidl, r=mccr8
This type is fairly simple on the idl parsing side of things. I handle it in the
same way that special types such as ns[C]String, nsid, and jsval are handled, by
using a special native type.

The logic for converting the value between C++ and JS follows the existing logic
from the nsISupports <=> JS Promise conversions.
2018-05-14 17:55:53 -04:00
Jan Henning 843d1912b1 Bug 1450314 - Remove unused parameters for memory-pressure notifications. r=gsvelto
"alloc-failure" is completely unused apart from the description text in nsI-
Memory.idl (and has been since before Firefox 17), while "lowering-priority" is
still being checked for in the PuppetWidget, but otherwise unused as well since
the feature using it was decommissioned in bug 1234176.

Since we're touching the PuppetWidget code anyway, we take the opportunity to
add a check for "low-memory-ongoing" instead, since similar as to how things
used to be with "lowering-priority", we want to drop the LayerManager's cached
resources only when receiving a real full memory-pressure event, but not for
subsequent ongoing notifications.

MozReview-Commit-ID: HL03SOU8axe

--HG--
extra : rebase_source : c988769df36d8d77f4770c71d5c5e0d75c3b99af
2018-05-06 13:17:11 +02:00
Andrew McCreight 6c4a1d23f2 Bug 1460636 - Don't trace jsids on ObjectGroup in the cycle collector. r=jonco,sfink
For some reason, the CC spends a lot of time tracing jsids on
ObjectGroups when an addon is installed. This patch avoids that by
adding a canSkipJsids flag to JSTracer, and using it in
ObjectGroup::traceChildren. If this is true, then the tracer is free
to not report every jsid. This flag is set to true for the two CC
tracers.

MozReview-Commit-ID: CWFqQEr0SxV

--HG--
extra : rebase_source : cc31c22717f8990166454db191e0d40c145e09f0
2018-05-11 11:38:58 -07:00
Chris Peterson 87ddcb8273 Bug 1457813 - Part 3: Remove NS_PRECONDITION definition. r=froydnj
--HG--
extra : rebase_source : 9bad9e57e2e0363fb315949ac73b869fac0b9a73
2018-05-08 22:21:22 -07:00
Stephen A Pohl 860c14b396 Bug 1366808: Properly detect buildID mismatches between parent and child processes and display about:restartrequired to prompt the user to restart Firefox before proceeding. r=jimm,felipe,bz 2018-05-08 10:31:44 -04:00
Dorel Luca 2b4e625186 Backed out changeset b57df5aa1534 (bug 1457813) for conflict after bug 833098 got backed out. CLOSED TREE 2018-05-08 14:49:35 +03:00
Chris Peterson 5a63a12794 Bug 1457813 - Part 3: Remove NS_PRECONDITION definition. r=froydnj
Use fatal MOZ_ASSERT or non-fatal NS_ASSERTION instead.

MozReview-Commit-ID: 1QAsgoWpXDn

--HG--
extra : source : 9ca972b6b3e7d3b576e20a0bf412df51d82aad9f
extra : intermediate-source : a909a9d7bc9a53095e963a4bea45f4fc4aa85b72
2018-04-27 21:42:24 -07:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Boris Zbarsky 4b6ed4c011 Bug 1456261. Add cycle collection bits for WebIDL dictionaries. r=smaug 2018-04-24 11:57:40 -04:00
Gabriele Svelto 902c8cde47 Bug 1451002 - Send ongoing memory pressure notifications when a low-memory condition persists for a long time; r=njn
--HG--
extra : rebase_source : d98800a5116e13dfc28e546cbf26beb0d6090147
2018-04-18 17:07:39 +02:00
Nathan Froyd 32dc58b2ba Bug 1451255 - make nsTraceRefcnt handle multibyte characters in log files; r=mccr8
...on Windows, at least.  Apparently if you have environment variables
set that contain multibyte characters, and ask for them with getenv, you
get garbage.  Or perhaps you get something sensible, but then passing it
to fopen produces garbage.  Either way, the most reasonable way to
handle this is to use the Windows wide-character APIs all over.
2018-04-17 10:13:42 -04:00
Nicholas Nethercote 59e46f2358 Bug 1451535 - Remove NS_ConstExprIsAscii() functions. r=froydnj 2018-04-17 20:03:52 +09:00
Margareta Eliza Balazs dbef13782c Backed out 2 changesets (bug 1451278) for breaking windows pgo builds a=backout
Backed out changeset ac685df07bfc (bug 1451278)
Backed out changeset 5944ccd5060d (bug 1451278)
2018-04-16 21:41:03 +03:00
Nicholas Nethercote 2224229b3d Bug 1451278 - Remove NS_ConstExprIsAscii() functions. r=froydnj
MozReview-Commit-ID: DG2HUOa7x6y

--HG--
extra : rebase_source : a0e2f24f96cb688d11984827acb1361abc4988e6
2018-04-16 08:37:25 +10:00
Jeff Walden 821db93ccc Bug 1453456 - Replace nsCRT::IsAscii{Alpha,Digit} with mfbt/TextUtils.h versions. r=froydnj
--HG--
extra : rebase_source : b31986c0e6828be79442cfb0cf369eb80c232139
2018-04-12 20:19:30 -07:00
Honza Bambas 198d72916a Bug 1451686 - Allow also -MOZ_LOG/_FILE=value form of the logging arguments. r=erahm 2018-04-13 05:38:00 -04:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Karl Tomlinson 3481a11d87 bug 1328964 add CycleCollectedJSContext::IsSystemCaller() to make ThreadsafeIsSystemCaller() safe for worklets r=baku
MozReview-Commit-ID: Cg4OBbm5CwA

--HG--
extra : rebase_source : 9a113cf0f945bd48207e81f9fa08bcba1f35303c
2018-04-06 18:53:25 +12:00
Karl Tomlinson 2405fe930c bug 1328964 use nsContentUtils::GetCurrentJSContext() on all threads r=smaug
nsContentUtils::GetCurrentJSContextForThread() originally needed to use
workers::GetCurrentThreadJSContext() in
https://hg.mozilla.org/mozilla-central/rev/366a45b41539#l2.18
because CycleCollectedJS*()->Context() did not exist until
https://hg.mozilla.org/mozilla-central/rev/1a0cd542e1e9#l7.12

nsContentUtils::GetCurrentJSContext() is thread-safe since these changes:
https://hg.mozilla.org/mozilla-central/rev/e636c7186286#l3.12
https://hg.mozilla.org/mozilla-central/rev/c8029c072776#l2.12

MozReview-Commit-ID: 2f1eGS9uBBO

--HG--
extra : rebase_source : dad1d2084a63413c3975f9e7c66c6b06857c9f23
2018-04-09 12:11:18 +12:00
Karl Tomlinson ad9f69cbf9 bug 1328964 add CycleCollectedJSContext::GetAsWorkletJSContext() and use it in IsOnWorkletThread() r=smaug
MozReview-Commit-ID: BUujWXYho1G

--HG--
extra : rebase_source : 78bb6736f74bb59913bc9499fcfdf7b0baa7870d
2018-04-06 09:45:56 +12:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Nika Layzell 58eeb66cb3 Bug 1438026 - Part 4: Remove the old nsPresState code completely, r=baku 2018-04-10 17:49:44 -04:00
Andreea Pavel 26f640b36b Backed out 4 changesets (bug 1366808) for Windows GPU leakchecks on a CLOSED TREE
Backed out changeset 23f60e5acaa2 (bug 1366808)
Backed out changeset bf2262b6aca8 (bug 1366808)
Backed out changeset 1fc82af3a155 (bug 1366808)
Backed out changeset 0649f0d9884b (bug 1366808)
2018-04-10 05:11:36 +03:00
Stephen A Pohl b40a23754c Bug 1366808: Properly detect buildID mismatches between parent and child processes and display about:restartrequired to prompt the user to restart Firefox before proceeding. r=jimm,felipe,bz 2018-04-09 20:16:31 -04:00
Honza Bambas 31c173ca8a Bug 1443892 - Add -MOZ_LOG and -MOZ_LOG_FILE command line arguments. r=erahm, r=nfroyd 2018-04-03 11:32:00 -04:00
Henri Sivonen 8402e1f7a2 Bug 1448772 - Avoid back-and-forth UTF-16 to UTF-8 to UTF-16 conversions in xpcom/base/MacHelpers.mm. r=mstange
MozReview-Commit-ID: LQ4ZMJzy5WI

--HG--
extra : rebase_source : 85320f3e0bcef7711517ecc1e5b7bc5ec074bda5
2018-03-26 10:49:02 +03:00
Masatoshi Kimura 2002810e0f Bug 1449082 - Make NS_IsAscii constexpr. r=froydnj
MozReview-Commit-ID: GbXFwCzUwgV

--HG--
extra : rebase_source : 4e7ceae0bda793247286901cfffdff5575800edb
2018-03-27 23:59:55 +09: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
Steve Fink e0f4a04fd4 Bug 1447391 - Early return for strings and symbols when tracing for CC, r=mccr8
--HG--
extra : rebase_source : f4512c0ab8d7aac3f274d38b96594eb65fb149dd
2018-03-20 10:54:29 -07:00
Petr Sumbera c5a5409300 Bug 1446272 - Provide ResidentUniqueDistinguishedAmount() for Solaris. r=froydnj 2018-03-22 06:14:19 -07:00
Paul Adenot 816186a405 Bug 1447622 - Add a way to output raw MOZ_LOG, without prefixes. r=erahm
MOZ_LOG=modules:4,raw now outputs the log without prefixes with the thread name
and date and stuff, just the exact string that was specified.

MozReview-Commit-ID: HACT5EM4BFm

--HG--
extra : rebase_source : 93590ee405f013791ad63565be6e6d83cad3567f
extra : source : d79d7130b28275c8eb2a475bdc685a345b070888
2018-03-21 12:11:17 +01:00
Kyle Machulis e9c55b249d Bug 1406206 - Remove extraneous else block from cycle collection macros; r=froydnj
clang-tidy is complaining about an extra else in
NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION. Not hurting anything, but
could be cleaned up anyways.

MozReview-Commit-ID: 36Lkdhs3fyN

--HG--
extra : rebase_source : 74088c9c2668f43d55133be240d4591880b60dab
2018-03-14 15:36:59 -07:00
Nathan Froyd 10b5e09d51 Bug 1440166 - actually avoid races in refcount logging with named classes; rs=erahm 2018-03-14 17:03:52 -04:00
Nathan Froyd 1732506d79 Bug 1440166 - avoid races in refcount logging with named classes; r=mccr8 2018-03-14 09:49:19 -04:00
Nathan Froyd 075adc9ec6 Bug 1445584 - add a move assignment operator for nsCOMPtr; r=gerald
Somehow we didn't have this before.  The lack thereof was causing us to
do unnecessary things during event dispatch.
2018-03-14 08:22:30 -04:00
Olli Pettay 2439836b37 Bug 1193394 - Part 1: Microtasks and promises scheduling. r=bevis 2017-11-17 11:01:27 +08:00
Tiberius Oros 61d400da1c Merge inbound to mozilla-central. a=merge 2018-03-01 19:29:00 +02:00