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

21199 Коммитов

Автор SHA1 Сообщение Дата
Jeff Muizelaar c8d65b5b73 Bug 1718262 - Remove duplicated declaration of NS_GetCurrentThread. r=mccr8
The other definition is in nsThreadUtils.h

Differential Revision: https://phabricator.services.mozilla.com/D118831
2021-06-25 18:35:09 +00:00
Florian Quèze cd399a71a2 Bug 1717991 - Remove ifdefs around code that adds profiler markers with custom marker schemas, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D118680
2021-06-25 13:28:01 +00:00
Jeff Muizelaar 8a78449866 Bug 1718154 - Remove unneeded MOZILLA_INTERNAL_API from nsThreadUtils.cpp. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D118771
2021-06-25 03:06:35 +00:00
Toshihito Kikuchi b293d8345b Bug 1718074 - Early return from the callback when the object was shut down. r=gsvelto
`nsAvailableMemoryWatcher::mTimer` was nullptr when `LowMemoryCallback()` tried to
initialize a timer via `OnLowMemory()`.  There are two possible reasons.

The first case is that NS_NewTimer() returned nullptr because the available memory was
already low when initializing `nsAvailableMemoryWatcher`.  In this case, we should not
register the callback.

The second case is the low-memory callback was queued while shutting down
`nsAvailableMemoryWatcher` (just before we unregiter the callback).  We do refcount
the object and use the mutex correctly, but we touch the nulled out member.  We should
make an early return if the object was shut down.

Differential Revision: https://phabricator.services.mozilla.com/D118745
2021-06-24 19:31:29 +00:00
Jon Coppeard 6e8963d230 Bug 1717204 - Increase the number of threads used by the XPCOM thread pool to match the number of cores r=bas
Currently the XPCOM thead pool creates one less thread than the number of
cores. The JS helper thread pool creates an equal number.

I tested increasing the number of threads to match the number of cores and
found it resolved this regression.

Differential Revision: https://phabricator.services.mozilla.com/D118327
2021-06-23 14:09:18 +00:00
Nika Layzell 5731c1747c Bug 1717526 - String's implicit conversion operator causes COW relocations, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D118430
2021-06-23 01:57:00 +00:00
Alexandru Michis e3d24b013a Backed out changeset 3beb01f5d643 (bug 1717526) for causing gtest failures in SpanTest.from_xpcom_collections
CLOSED TREE
2021-06-23 01:58:49 +03:00
Nika Layzell c14de7eabc Bug 1717526 - String's implicit conversion operator causes COW relocations, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D118430
2021-06-22 21:18:03 +00:00
Nika Layzell eaa7724180 Bug 1714226 - Return the number of removed elements from nsTArray::RemoveElementsBy, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D116664
2021-06-22 18:17:17 +00:00
Kris Maglione cd43e30d8b Bug 1714112: Add new Fission decision value for phased rollout enablement. r=nika,fluent-reviewers,flod
This should be less confusing to users, and makes it easier to triage
about:support data.

Differential Revision: https://phabricator.services.mozilla.com/D118416
2021-06-22 17:28:34 +00:00
Butkovits Atila 83f57b5c69 Backed out 22 changesets (bug 1714226, bug 1706374, bug 1713148) for causing build bustages on MessageChannel.cpp. CLOSED TREE
Backed out changeset ea469eaa54ca (bug 1713148)
Backed out changeset fd8523d5126e (bug 1713148)
Backed out changeset f2e5309c914c (bug 1713148)
Backed out changeset 2da57973ed55 (bug 1713148)
Backed out changeset 677e1ee99bb2 (bug 1713148)
Backed out changeset b4c0619e79bf (bug 1706374)
Backed out changeset c02fa459e77d (bug 1706374)
Backed out changeset 72dc6537cf0b (bug 1706374)
Backed out changeset 48088463c656 (bug 1706374)
Backed out changeset b09ae4c3a94b (bug 1706374)
Backed out changeset 04422175004b (bug 1706374)
Backed out changeset 110b2384e7d1 (bug 1706374)
Backed out changeset ab2b086abbd4 (bug 1706374)
Backed out changeset ffde07f73249 (bug 1706374)
Backed out changeset c6303af17ff4 (bug 1706374)
Backed out changeset 02249671c2f9 (bug 1706374)
Backed out changeset a6a5d05b5636 (bug 1706374)
Backed out changeset e21b6defb805 (bug 1706374)
Backed out changeset c72c5be9ddb1 (bug 1706374)
Backed out changeset 23cd961575a6 (bug 1706374)
Backed out changeset b412d6e9e145 (bug 1706374)
Backed out changeset a8ec285d6472 (bug 1714226)
2021-06-22 04:03:56 +03:00
Nika Layzell 55b81f9748 Bug 1714226 - Return the number of removed elements from nsTArray::RemoveElementsBy, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D116664
2021-06-21 21:53:05 +00:00
R Aravind 4e0ddca83e Bug 1713525 - removed 'else' after 'return'. r=gerald
- added 'return true' for non null stream
- removed 'else' and 'return stream != nullptr'

Differential Revision: https://phabricator.services.mozilla.com/D118289
2021-06-21 15:33:01 +00:00
Andrew Osmond 98f810e4e4 Bug 1715515 - Part 1. Switch Windows 32 and mingwclang tests to WebRender. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D117287
2021-06-21 12:46:32 +00:00
Brindusan Cristian 97b71ee13f Backed out 2 changesets (bug 1715515) for breaking the decision task.
CLOSED TREE

Backed out changeset 2e674ac39f8f (bug 1715515)
Backed out changeset 39580a1b4188 (bug 1715515)
2021-06-18 03:20:07 +03:00
Andrew Osmond be550ad9c9 Bug 1715515 - Part 1. Switch Windows 32 and mingwclang tests to WebRender. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D117287
2021-06-17 23:53:39 +00:00
Jon Coppeard c69960a99b Bug 1716940 - Increase TaskController thread stack size r=bas
This increases the stack size used for task controller threads to the size
previously used for JS helper threads. Some parsing use cases can use a lot of
stack.

Differential Revision: https://phabricator.services.mozilla.com/D118184
2021-06-17 16:14:20 +00:00
Jon Coppeard b4a00f01a6 Bug 1716940 - Pass external thread stack size through to the JS engine r=sfink,bas
This adds plumbing to make the JS engine set the stack quota based on the
actual stack size for external thread pool threads (and internal thread pool
ones).

The quota is calculated as 90% of the size, which is currently hardcoded into
the constants.

Differential Revision: https://phabricator.services.mozilla.com/D118183
2021-06-17 16:14:19 +00:00
kriswright 058d3e6e68 Bug 1683404 - Wrap the timer thread behind a mutex. r=nika
This particular race is a tricky one - there's no perfect solution to protecting the timer thread from being called in `cancel` while being dereferenced. This ensures that we won't run into that problem by locking all of our TimerThread calls behind a mutex inside a wrapper class. Then we hold onto the wrapper class until after we shutdown `nsThreadManager`, in which case no background thread pools should be active anymore to call `nsTimerImpl::Cancel`.

For reference, the worst-case scenario happens when another thread dereferences `gThread` [between these two calls](https://searchfox.org/mozilla-central/rev/98a9257ca2847fad9a19631ac76199474516b31e/xpcom/threads/nsTimerImpl.cpp#402-403), in which case we will get stuck on a dereferenced mutex. By putting the check and the actual call into `gThread` behind a mutex maybe we can prevent this issue.

Differential Revision: https://phabricator.services.mozilla.com/D115453
2021-06-17 15:36:00 +00:00
Florian Quèze dfeb53e219 Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 09:33:00 +00:00
Iulian Moraru b02492de66 Backed out changeset 617a466d0cce (bug 1715257) for causing build bustages. CLOSED TREE 2021-06-17 10:58:16 +03:00
Florian Quèze 7b4906a6bd Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 06:12:10 +00:00
Sean Feng eb8464f241 Bug 1632733 - Always use InputTaskManager for InputHigh tasks regardless InputEventQueueState r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D118028
2021-06-16 19:54:37 +00:00
Aaron Klotz e46f2fb521 Bug 1716036: Use StaticLocalAutoPtr for magic statics in nsThread; r=KrisWright
The "magic static" objects created in `nsThread::ThreadList` and
`nsThread::ThreadListMutex` have non-trivial destructors, so they end up
setting `atexit` hooks.

I'd like to switch these over to be `StaticLocalAutoPtr`s which were added
specifically for the purpose of holding magic statics, and have trivial
destructors.

Differential Revision: https://phabricator.services.mozilla.com/D117549
2021-06-14 21:40:07 +00:00
Mats Palmgren e4d7dd995a Bug 1542807 part 3 - Add some style quirks for legacy ::markers created from list-style-type/list-style-image. r=emilio
Specifically:
For "bullets", i.e. 'list-style-type:disc|circle|square|
disclosure-closed|disclosure-open', we use a built-in font
(-moz-bullet-font, which has glyphs for those symbols + space) to
retain mostly backwards compatible rendering for those.  Authors may
override that with an explicit 'font-family' ::marker style though.
We also use this font for 'list-style-image' in case it would
fallback to one of the above when the image fails to load (so that
we get the same width space).

When the -moz-bullet-font is used we also set 'font-synthesis' to
avoid synthesizing italic/bold for this font. Authors may override
this with an explicit ::marker declaration.

We also set 'letter-spacing' and 'word-spacing' to the initial value
for bullets for web-compat reasons.  Again, authors may override
this with an explicit ::marker declaration. (This breaks backwards-
compat slightly but makes us compatible with Chrome.  We used to
ignore these for list-style-type:<string> too.)

Differential Revision: https://phabricator.services.mozilla.com/D111693
2021-06-14 01:22:06 +00:00
Gabriele Svelto 0c7c411099 Bug 1715026 - Properly transfer ownership of the memory pressure watcher to the memory resource callback r=tkikuchi
Differential Revision: https://phabricator.services.mozilla.com/D117051
2021-06-12 05:54:01 +00:00
Butkovits Atila ed3da455ae Backed out 7 changesets (bug 1542807) for causing failures at inert-retargeting-iframe.tentative.html. CLOSED TREE
Backed out changeset e9ef32fa2f2e (bug 1542807)
Backed out changeset 8fa0cb199975 (bug 1542807)
Backed out changeset 38daf64afe59 (bug 1542807)
Backed out changeset e3aee052c495 (bug 1542807)
Backed out changeset a71056d4c7cc (bug 1542807)
Backed out changeset cf91e7d0a37f (bug 1542807)
Backed out changeset eee949e5fd67 (bug 1542807)
2021-06-12 01:38:25 +03:00
Michelle Goossens e4e6b27045 Bug 1714349 - Remove browser.proton.modals.enabled pref r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D116903
2021-06-11 18:14:26 +00:00
Mats Palmgren 0372796619 Bug 1542807 part 3 - Add some style quirks for legacy ::markers created from list-style-type/list-style-image. r=emilio
Specifically:
For "bullets", i.e. 'list-style-type:disc|circle|square|
disclosure-closed|disclosure-open', we use a built-in font
(-moz-bullet-font, which has glyphs for those symbols + space) to
retain mostly backwards compatible rendering for those.  Authors may
override that with an explicit 'font-family' ::marker style though.
We also use this font for 'list-style-image' in case it would
fallback to one of the above when the image fails to load (so that
we get the same width space).

When the -moz-bullet-font is used we also set 'font-synthesis' to
avoid synthesizing italic/bold for this font. Authors may override
this with an explicit ::marker declaration.

We also set 'letter-spacing' and 'word-spacing' to the initial value
for bullets for web-compat reasons.  Again, authors may override
this with an explicit ::marker declaration. (This breaks backwards-
compat slightly but makes us compatible with Chrome.  We used to
ignore these for list-style-type:<string> too.)

Differential Revision: https://phabricator.services.mozilla.com/D111693
2021-06-11 18:10:39 +00:00
Eitan Isaacson 349592fb91 Bug 1714390 - P6: Make more attribute keys static atoms. r=Jamie
Keys should be static atoms whenever possible.

Differential Revision: https://phabricator.services.mozilla.com/D116787
2021-06-10 23:07:07 +00:00
Eitan Isaacson 4fc2c36ea8 Bug 1714390 - P5: Use static aria_* atoms for aria attributes. r=Jamie
ATK, Windows and XPCOM expect aria attribute keys to be stripped of
their aria- prefix. We should still store the item using the aria_ atom
and then strip the prefix when converting the key to a string.

Differential Revision: https://phabricator.services.mozilla.com/D116786
2021-06-10 23:07:07 +00:00
Sean Feng e903455002 Bug 1708070 - Change InputVsyncState in InputPriorityController::WillRunTask r=smaug
Before this patch, we use InputPriorityController::DidRunTask to change
InputVsyncState which is problematic.

Consider this scenario
  1. Two events are in the queue, vsync(V1) and input(I1)
  2. I1 runs and starts an inner event loop (We only expect one input
     event to be run because there's only one input event)
  3. Another input event(I2) arrives
  4. Inner event loop picks I2 to run
  5. When I2 is finished, it sets the InputVsyncState to `RunVsync`
  6. I1's DidRunTask is called and crashed because the state shouldn't
     be `RunVsync`.

This patch moves the code which checks InputVsyncState from `DidRunTask`
to `WillRunTask` so that the state is correctly checked and updated
before the input task is about to run.

Differential Revision: https://phabricator.services.mozilla.com/D117336
2021-06-09 17:01:30 +00:00
Jon Coppeard 50c5254a22 Bug 1713287 - Change the number of threads TaskController creates to match those required by the JS engine r=bas
Currently parallel Wasm compilation requires at least two threads for
architectural reasons. This patch updates the TaskController thread policy such
that there are always two threads available, even on single core systems.

Differential Revision: https://phabricator.services.mozilla.com/D117002
2021-06-09 09:23:20 +00:00
Dorel Luca 816a6098d2 Backed out 3 changesets (bug 1714349) for Browser-chrome failures in browser/components/places/tests/browser/browser_addBookmarkForFrame.js. CLOSED TREE
Backed out changeset 598f8e7d73ef (bug 1714349)
Backed out changeset cc7365aacdbb (bug 1714349)
Backed out changeset f0f942a93495 (bug 1714349)
2021-06-09 04:48:41 +03:00
Michelle Goossens 6e11a4ab14 Bug 1714349 - Fix test failures on test_chrome_only_media_queries.html
Differential Revision: https://phabricator.services.mozilla.com/D117249
2021-06-09 00:02:38 +00:00
Andrey Bienkowski 888618300d Bug 1714376 - Replace a number of "exception.message" usages. r=mhentges,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D116723
2021-06-08 15:50:10 +00:00
Michelle Goossens 1895a736f3 Bug 1714352 - Remove browser.proton.doorhangers.enabled pref r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D117091
2021-06-08 00:41:43 +00:00
Brindusan Cristian 08feb9e246 Backed out changeset f9eb0924a327 (bug 1711398) for causing xpcshell failures in test_TelemetryLateWrites.js.
CLOSED TREE
2021-06-07 21:54:55 +03:00
Doug Thayer f2c9eecfd2 Bug 1711398 - Include JS stacks in late write data r=florian,gerald
This mirrors the BHR stack collection code, and uses some of its utilities,
such as the ThreadStackHelper class.

Differential Revision: https://phabricator.services.mozilla.com/D115215
2021-06-07 18:04:17 +00:00
Csoregi Natalia 0a9e50b29c Bug 1714561 - Fix black lint. r=fix CLOSED TREE 2021-06-07 18:52:35 +03:00
Jon Coppeard 97ba8e2712 Bug 1714561 - Add test that single-zone JS holders can contain a pointer into the atoms zone r=mccr8
Depends on D116848

Differential Revision: https://phabricator.services.mozilla.com/D116978
2021-06-07 15:19:30 +00:00
Jon Coppeard 39dcc0ea21 Bug 1714561 - Allow single-zone JS holders to contain pointers into the atoms zone r=mccr8,sfink
Differential Revision: https://phabricator.services.mozilla.com/D116848
2021-06-07 15:19:29 +00:00
Toshihito Kikuchi a2c93279d1 Bug 1713100 - Move AvailableMemoryTracker::Init() back to NS_InitXPCOM. r=gsvelto
Bug 1711610 moved `AvailableMemoryTracker::Init()` from `NS_InitXPCOM` to `XRE_mainRun`,
but it caused memory degradation because `AvailableMemoryTracker` was no longer initialized
in the child processes.

I made that part for `nsAvailableMemoryWatcher` to cache the pref value in the earlier design,
but it's not needed at all in the current design because `nsAvailableMemoryWatcher` loads
a mirror value every time.

This patch reverts `AvailableMemoryTracker::Init()` back to `NS_InitXPCOM`.

Differential Revision: https://phabricator.services.mozilla.com/D116742
2021-06-04 14:16:02 +00:00
Dorel Luca f021feb29f Backed out changeset 68f73772f51e (bug 1714376) for Xpcom failures in builds/worker/checkouts/gecko/xpcom/idl-parser/xpidl/runtests.py. CLOSED TREE 2021-06-04 02:19:33 +03:00
Andrey Bienkowski a7a4542e20 Bug 1714376 - Replace a number of "exception.message" usages. r=mhentges,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D116723
2021-06-03 20:08:51 +00:00
Emilio Cobos Álvarez a92eb7c353 Bug 1714357 - Use a nicer media query for proton context menus. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D116736
2021-06-03 17:51:48 +00:00
Jon Coppeard 0f11271b15 Bug 1704923 - Pass the number of threads when setting up an external thread pool r=sfink,bas
The JS helper thread system needs to know how many threads are available, in
particular because parallel Wasm compilation needs at least two threads to
avoid deadlock. This adds a method to get the count from TaskController and
passes it through to the JS engine when setting up the thread pool.

Differential Revision: https://phabricator.services.mozilla.com/D116220
2021-06-03 10:24:13 +00:00
Sandor Molnar 3da6a04bc0 Backed out 4 changesets (bug 1704923) for causing multiple failures in js::wasm::CompilerEnvironment::computeParameters. CLOSED TREE
Backed out changeset 498f9f3927f9 (bug 1704923)
Backed out changeset 9eabc7fc9b81 (bug 1704923)
Backed out changeset fedb48e21c75 (bug 1704923)
Backed out changeset 59c3af3d6e7f (bug 1704923)
2021-06-03 12:02:43 +03:00
Jon Coppeard 7440bcfa65 Bug 1704923 - Pass the number of threads when setting up an external thread pool r=sfink,bas
The JS helper thread system needs to know how many threads are available, in
particular because parallel Wasm compilation needs at least two threads to
avoid deadlock. This adds a method to get the count from TaskController and
passes it through to the JS engine when setting up the thread pool.

Differential Revision: https://phabricator.services.mozilla.com/D116220
2021-06-03 07:31:31 +00:00
Toshihito Kikuchi cfc57683ac Bug 1712630 - Introduce ProcessType.jsm to manage process type strings. r=Gijs,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D116438
2021-06-01 17:44:22 +00:00