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

21485 Коммитов

Автор SHA1 Сообщение Дата
Iulian Moraru 28f6ed5050 Backed out 2 changesets (bug 1726177) for causing gtest failures on TestTimers.cpp. CLOSED TREE
Backed out changeset 82ec582992fd (bug 1726177)
Backed out changeset 50952e0327ee (bug 1726177)
2021-09-02 03:09:10 +03:00
Byron Campen [:bwc] f509892eee Bug 1726177: For repeating precise, keep the cadence when we finish firing late. r=xpcom-reviewers,nika
Covers the case where we finish late because the callback took a long time,
and the case where we fired really late (eg; because of sleep).

Differential Revision: https://phabricator.services.mozilla.com/D123814
2021-09-01 21:46:48 +00:00
Byron Campen [:bwc] d912c972f5 Bug 1726177: Update IDL file to better reflect previous behavior, and cover this behavior in the test-case. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D123813
2021-09-01 21:46:48 +00:00
Cristian Tuns 8410d730ff Backed out changeset 38c2002963c9 bug(1727563) for causing gtest crashes on RWLock. CLOSED TREE DONTBUILD 2021-09-01 06:54:36 -04:00
Andreas Pehrson e6b64b97b1 Bug 1727563 - Implement TryLock methods and RAII helpers for RWLock. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D124066
2021-09-01 10:11:44 +00:00
Andreas Pehrson ca7808acf7 Bug 1727558 - Implement an RAII class for Mutex::TryLock. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D124058
2021-09-01 10:10:24 +00:00
Andreas Pehrson 9522f917c0 Bug 1727558 - Dont CheckAcquire() in debug version of OffTheBooksMutex::TryLock(). r=xpcom-reviewers,nika
There is no risk of deadlock in TryLock(). Having this breaks the AutoTryLock
gtest.

Differential Revision: https://phabricator.services.mozilla.com/D124111
2021-09-01 10:10:24 +00:00
Florian Quèze 2ef0bca3f5 Bug 1728228 - Add profiler markers in the Timer thread to understand its activity, r=gerald,smaug,KrisWright.
Differential Revision: https://phabricator.services.mozilla.com/D123989
2021-08-31 13:41:46 +00:00
Florian Quèze 6e961a488c Bug 1727517 - Require task controller tasks to have a name, r=bas.
Differential Revision: https://phabricator.services.mozilla.com/D123618
2021-08-31 13:41:45 +00:00
Florian Quèze c76671a979 Bug 1727137 - Require IdleRunnable instances to have a name, r=bas.
Differential Revision: https://phabricator.services.mozilla.com/D123357
2021-08-31 13:41:45 +00:00
Sandor Molnar c235ffd64c Backed out 3 changesets (bug 1727137, bug 1727517, bug 1727756) for causing build bustages. CLOSED TREE
Backed out changeset 8796b374824b (bug 1727756)
Backed out changeset 49d136788ebd (bug 1727517)
Backed out changeset 092525a3d26a (bug 1727137)
2021-08-30 19:39:16 +03:00
Florian Quèze ae2121ec28 Bug 1727517 - Require task controller tasks to have a name, r=bas.
Differential Revision: https://phabricator.services.mozilla.com/D123618
2021-08-30 16:09:49 +00:00
Florian Quèze 48ad00f6e2 Bug 1727137 - Require IdleRunnable instances to have a name, r=bas.
Differential Revision: https://phabricator.services.mozilla.com/D123357
2021-08-30 16:09:49 +00:00
Sonia Singla 5a362eb7d0 Bug 1727302 - Add onsecuritypolicyviolation event handler.r=smaug
`onsecuritypolicyviolation` attribute has been added to `GlobalEventHandlers` by https://github.com/whatwg/html/pull/2651

List of tests:
1. w3c/web-platform-tests/dom/idlharness.window.html
2. w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events.html
3. w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window.html
4. w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html

This new spec addition is already implemented in Safari[0] recently and Chromium[1] will be working on it soon.

[0] https://bugs.webkit.org/show_bug.cgi?id=229381
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=1242893

Differential Revision: https://phabricator.services.mozilla.com/D123891
2021-08-29 18:05:01 +00:00
Sonia Singla 8577eff6ca Bug 1501983 - Add onslotchange event handler.r=smaug
Reflects following spec changes:
- https://github.com/whatwg/html/pull/4129
- https://github.com/whatwg/dom/pull/785

Those new spec addition is already implemented in Safari and Chromium is working on it.

Differential Revision: https://phabricator.services.mozilla.com/D123775
2021-08-27 20:15:30 +00:00
Jari Jalkanen 53e46875cf Bug 1690326 - Map Windows local file error 0x7B ERROR_INVALID_NAME to NS_ERROR_FILE_INVALID_PATH, r=xpcom-reviewers,dom-storage-reviewers,nika,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D123181
2021-08-25 18:59:54 +00:00
Nika Layzell 6d8a72603f Bug 1727422 - Support arbitrary integer keys in nsTHashMap, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D123547
2021-08-25 16:31:08 +00:00
Ava Katushka ava8katushka 6cc1c2c5b3 Bug 1726732 Returning the code solving filename disclosure in tmp dir. r=emk,mtigley
Differential Revision: https://phabricator.services.mozilla.com/D123219
2021-08-25 14:50:22 +00:00
kriswright 568caecfff Bug 1678149 - Use a mozilla::Queue in TaskQueue r=xpcom-reviewers,mccr8
It looks like we can do a mostly direct swap from `std::Queue` to `mozilla::Queue` without needing to expose any new API, so that's what I've done here.

Differential Revision: https://phabricator.services.mozilla.com/D123523
2021-08-25 14:10:06 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Gerald Squelart 29f190e9e6 Bug 1722261 - Use AUTO_PROFILER_REGISTER_THREAD where possible - r=canaltinova
With the new ThreadRegistration classes, it becomes more important to properly balance registrations with unregistrations. Though mismatches are safely handled when they happen, in particular missing unregistrations can lead to leaks that make tests fail.

This patch changes `PROFILER_REGISTER_THREAD` in TaskController.cpp to `AUTO_PROFILER_REGISTER_THREAD`, to ensure that TaskController threads get unregistered when they're finished.

In AsyncLogger.h, a pair of `PROFILER_REGISTER_THREAD` and `PROFILER_UNREGISTER_THREAD` is converted to a single `AUTO_PROFILER_REGISTER_THREAD`. This is equivalent, but the latter is safer, in case the code in-between later changes to include early breaks or returns.

Differential Revision: https://phabricator.services.mozilla.com/D123228
2021-08-24 04:47:12 +00:00
Makoto Kato 7276175dab Bug 1717205 - Add riscv64gc xptcall support. r=xpcom-reviewers,nika
Tested on Ubuntu 21.04/riscv64gc with HiFive Unmatched.

Differential Revision: https://phabricator.services.mozilla.com/D123056
2021-08-23 11:27:04 +00:00
Kagami Sascha Rosylight eddf271c1f Bug 1726648 - Add a helper to trim brackets from nsID r=mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D123163
2021-08-23 10:54:11 +00:00
Andi-Bogdan Postelnicu 9945b94835 Bug 1519636 - Reformat recent changes to the Google coding style. r=emilio
Updated with clang-format version 12.0.1 (taskcluster-dNZqCRqWRTqa6cZxPKxh7Q)

Differential Revision: https://phabricator.services.mozilla.com/D122814
2021-08-23 09:30:23 +00:00
Iulian Moraru a16afaadfe Backed out changeset d21b3f88a2b4 (bug 1726648) for causing build bustages. CLOSED TREE 2021-08-23 04:12:02 +03:00
Kagami Sascha Rosylight 0c5086660f Bug 1726648 - Add a helper to trim brackets from nsID r=mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D123163
2021-08-23 00:35:40 +00:00
Haik Aftandilian a86c654e4d Bug 1722758 - Patch 3 - Change netCharType to be an unsigned char array instead of int to save space r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D122652
2021-08-20 18:54:03 +00:00
Haik Aftandilian 6e49780b6e Bug 1722758 - Patch 2 - Add a new encoding mode to be used for Apple NSURL compatibility r=necko-reviewers,valentin
Add a new encoding mode to be used to encode an already-encoded URL to be compatible with Apple's NSURL.

Add a function for creating an nsIURI with NSURL compatible encoding from a URL string.

Differential Revision: https://phabricator.services.mozilla.com/D122651
2021-08-20 18:54:03 +00:00
Haik Aftandilian 1ce57f2a3e Bug 1722758 - Patch 1 - Reformat the encoding table r=necko-reviewers,valentin
Rearrange and reformat the encoding table to make space for two digit entries needed for an additional encoding enum.

Convert entries to hex.

Differential Revision: https://phabricator.services.mozilla.com/D122650
2021-08-20 18:54:02 +00:00
Nicklas Boman a13038925c Bug 1308094 - Remove PL_strdup and PL_strfree from BloatEntry r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D122149
2021-08-17 19:34:32 +00:00
Mike Hommey 4a315c973f Bug 1723445 - Use MOZ_ANDROID_LIBDIR in BinaryPath::Get instead of GRE_HOME. r=nika
The use of GRE_HOME was cargo-culted well back when, and doesn't reflect
the reality of where the executables and libraries are on Android.
Libxul and its dependent libraries are actually loaded from
MOZ_ANDROID_LIBDIR, set from the Java side, and used in APKOpen.cpp,
matching reality more closely.

Unfortunately, this opens a whole can of worms, because some things
that indirectly rely on the fallback code path in
nsDirectoryService::GetCurrentProcessDirectory make assumptions that
don't hold with the directory containing the libraries on Android. So
they currently work with GRE_HOME, but fail with MOZ_ANDROID_LIBDIR.

We thus keep the nsDirectoryService::GetCurrentProcessDirectory callback
on GRE_HOME.

Differential Revision: https://phabricator.services.mozilla.com/D122323
2021-08-13 00:27:02 +00:00
Olli Pettay 5beba99004 Bug 1724777, optimize suppressed MicroTask handling, r=mccr8
The test is in theory racy, but trying to limit the cases when it might behave badly
by running it on opt desktop builds only. Without the patch the 'period' check takes over 400ms locally and with the
patch 1-3ms.

The changes are just trying to optimize execution, not change the behavior.
Use of SuppressedMicroTasks is perhaps a bit odd, but it helps keeping
SavedMicroTaskQueue and similar code simple.

Differential Revision: https://phabricator.services.mozilla.com/D122290
2021-08-12 16:01:08 +00:00
Valentin Gosu 0cfda7bb4a Bug 1705659 - Static-analysis check auto fix for auth code r=necko-reviewers,dragana
Depends on D112604

Differential Revision: https://phabricator.services.mozilla.com/D112605
2021-08-12 12:39:25 +00:00
Brindusan Cristian bed8fb35ca Backed out changeset bc9b9c1c8ab5 (bug 1723445) for causing GTest crashes.
CLOSED TREE
2021-08-12 02:23:59 +03:00
Mike Hommey 7a27adb89c Bug 1723445 - Use MOZ_ANDROID_LIBDIR in BinaryPath::Get instead of GRE_HOME. r=nika
The use of GRE_HOME was cargo-culted well back when, and doesn't reflect
the reality of where the executables and libraries are on Android.
Libxul and its dependent libraries are actually loaded from
MOZ_ANDROID_LIBDIR, set from the Java side, and used in APKOpen.cpp,
matching reality more closely.

Differential Revision: https://phabricator.services.mozilla.com/D122323
2021-08-11 22:16:47 +00:00
Alexandre Lissy f41c9baf2b Bug 1723753 - Remove XRE_USER_SYS_EXTENSION_DEV_DIR r=handyman,robwu,haik,gcp
Differential Revision: https://phabricator.services.mozilla.com/D121647
2021-08-10 15:54:02 +00:00
Nicklas Boman cd8acaa740 Bug 1308105 - Replace PL_strpbrk with strpbrk r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D116933
2021-08-10 11:30:39 +00:00
Andreas Pehrson 6cb6566663 Bug 1724867 - Allow using IsOnCurrentThread on AbstractThread. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D112842
2021-08-10 08:04:49 +00:00
Mozilla Releng Treescript a536ab927f Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2021-08-09 16:20:45 +00:00
Toshihito Kikuchi faa1254982 Bug 1722268 - Increase the timeout thresholds in AvailableMemoryWatcherFixture. r=gsvelto
Due to slower performance with ASan, this patch increases the thresholds.

Differential Revision: https://phabricator.services.mozilla.com/D121757
2021-08-07 07:06:12 +00:00
Olli Pettay 42e939719a Bug 1724107, be more precise when counting the number of allocator users, r=KrisWright
The patch is based on code inspection.

One could move sAllocatorUsers also to Free(), but shouldn't matter in practise.

Differential Revision: https://phabricator.services.mozilla.com/D121868
2021-08-05 19:36:32 +00:00
Haik Aftandilian 0e54896e07 Bug 1723604 - Patch 2 - Include memory_watcher data in Mac event pings r=mac-reviewers,bradwerth
Record duration of memory pressure periods in event pings using the support added in bug 1715858.

Differential Revision: https://phabricator.services.mozilla.com/D121795
2021-08-05 06:07:39 +00:00
Haik Aftandilian f54ac2b7c4 Bug 1723604 - Patch 1 - Refactor the MacMemoryPressureLevel enum into a basic class r=mac-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D121794
2021-08-05 06:07:39 +00:00
Bas Schouten 5555ff2d11 Bug 1716999: Hold the graph mutex when changing the observer. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D118804
2021-08-04 17:37:23 +00:00
Zibi Braniecki 750e9a5da5 Bug 1613705 - [localization] part11: Fix XPCOM future_task polling assert. r=nika
Depends on D105586

Differential Revision: https://phabricator.services.mozilla.com/D114508
2021-08-03 16:25:14 +00:00
Nika Layzell 29295703f8 Bug 1715773 - Remove preloaded newtab process selection logic, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D121423
2021-08-03 15:17:07 +00:00
Butkovits Atila 949da905e7 Backed out 19 changesets (bug 1613705) for causing build bustages complaining about Document.cpp. CLOSED TREE
Backed out changeset 2ee1091dd20d (bug 1613705)
Backed out changeset d377afc0b09f (bug 1613705)
Backed out changeset de9d4378f0ac (bug 1613705)
Backed out changeset 9843372abb6e (bug 1613705)
Backed out changeset 5fc5918e5905 (bug 1613705)
Backed out changeset a7aeae7afd49 (bug 1613705)
Backed out changeset 5d61617a5402 (bug 1613705)
Backed out changeset 85bf98573899 (bug 1613705)
Backed out changeset 175af8a1b8c2 (bug 1613705)
Backed out changeset 93fcb23d7898 (bug 1613705)
Backed out changeset 595529cd906f (bug 1613705)
Backed out changeset 9f3e2963d925 (bug 1613705)
Backed out changeset 442289058933 (bug 1613705)
Backed out changeset fc3b9acb0e81 (bug 1613705)
Backed out changeset 408983c64f7f (bug 1613705)
Backed out changeset 08b637fc3fcd (bug 1613705)
Backed out changeset 6ef0aafd2db0 (bug 1613705)
Backed out changeset d88b294e0a5e (bug 1613705)
Backed out changeset e6bebff87544 (bug 1613705)
2021-08-03 12:36:01 +03:00
Zibi Braniecki e4f37c5029 Bug 1613705 - [localization] part11: Fix XPCOM future_task polling assert. r=nika
Depends on D105586

Differential Revision: https://phabricator.services.mozilla.com/D114508
2021-08-03 05:52:04 +00:00
Cosmin Sabou 3564c330b3 Backed out 11 changesets (bug 1613705) for several test failures. CLOSED TREE
Backed out changeset 4e690882b6af (bug 1613705)
Backed out changeset 302e7a75affc (bug 1613705)
Backed out changeset 626b40e3aad1 (bug 1613705)
Backed out changeset 1cbab987bb7d (bug 1613705)
Backed out changeset 2213917abb30 (bug 1613705)
Backed out changeset c89aa0375690 (bug 1613705)
Backed out changeset 6466027c5767 (bug 1613705)
Backed out changeset 6c188c4b38bf (bug 1613705)
Backed out changeset 8d0c087b9896 (bug 1613705)
Backed out changeset 3404fd6725f1 (bug 1613705)
Backed out changeset c9cfbba15d90 (bug 1613705)
2021-08-02 14:04:29 +03:00
Zibi Braniecki 9bfbca88d8 Bug 1613705 - [localization] part11: Fix XPCOM future_task polling assert. r=nika
Depends on D105586

Differential Revision: https://phabricator.services.mozilla.com/D114508
2021-08-02 09:54:11 +00:00
Molly Howell a0c6decba2 Bug 1709969 Part 3 - Migrate from an existing profile when creating the dedicated profile for a Windows app package. r=mossop,agashlin
Differential Revision: https://phabricator.services.mozilla.com/D117244
2021-07-30 19:09:47 +00:00
Sandor Molnar 1aa5913c7d Backed out 3 changesets (bug 1709969) for causing xpc failures in test_select_profile_package. CLOSED TREE
Backed out changeset 17ed7ca86998 (bug 1709969)
Backed out changeset a6b917838765 (bug 1709969)
Backed out changeset 6a80559a4055 (bug 1709969)
2021-07-30 21:26:09 +03:00
Molly Howell ba09a654e2 Bug 1709969 Part 3 - Migrate from an existing profile when creating the dedicated profile for a Windows app package. r=mossop,agashlin
Differential Revision: https://phabricator.services.mozilla.com/D117244
2021-07-30 17:34:26 +00:00
Haik Aftandilian 66b55bf012 Bug 1714382 - Include the Mac memory pressure state in crash reports r=spohl,KrisWright
Subscribe to memory pressure events on macOS and add crash report annotations to parent and content process crash reports that can be used to determine if the system was under memory pressure at the time of the crash.

Include the memory pressure level reported via the DISPATCH_SOURCE_TYPE_MEMORYPRESSURE dispatch with timestamps of transitions, the memory pressure level as read from the kern.memorystatus_vm_pressure_level sysctl, and a measurement of the percentage of available memory in the system read from the kern.memorystatus_level sysctl.

Differential Revision: https://phabricator.services.mozilla.com/D116725
2021-07-27 16:17:43 +00:00
Emilio Cobos Álvarez 02bbf0389a Bug 1722299 - Initial support for the color-scheme CSS property. r=mstange
Add initial support for the color-scheme CSS property, allowing pages to
choose between light and dark system colors per-element, and such.

Things that are left to do so that this can be enabled by default:

 * Dark system colors on Windows / Android / Standins.
 * Dark Canvas/CanvasText/Link visited colors (which right now are set
   via PreferenceSheet).
 * Dark form controls in nsNativeBasicTheme.
 * Processing the color-scheme meta tag to fill-in
   Document::mColorSchemeBits.

But this seems like enough progress to be landable on its own.

Differential Revision: https://phabricator.services.mozilla.com/D120843
2021-07-27 15:50:48 +00:00
Iulian Moraru ee9e1dd7c0 Backed out changeset 4f0fe70a0e34 (bug 1714382) for causing assertion failures on nsCycleCollector.cpp. CLOSED TREE 2021-07-27 02:48:53 +03:00
Haik Aftandilian b00b0d585c Bug 1714382 - Include the Mac memory pressure state in crash reports r=spohl,KrisWright
Subscribe to memory pressure events on macOS and add crash report annotations to parent and content process crash reports that can be used to determine if the system was under memory pressure at the time of the crash.

Include the memory pressure level reported via the DISPATCH_SOURCE_TYPE_MEMORYPRESSURE dispatch with timestamps of transitions, the memory pressure level as read from the kern.memorystatus_vm_pressure_level sysctl, and a measurement of the percentage of available memory in the system read from the kern.memorystatus_level sysctl.

Differential Revision: https://phabricator.services.mozilla.com/D116725
2021-07-26 22:52:33 +00:00
Toshihito Kikuchi 7237c89b3d Bug 1715858 - Part3. Add a new category memory_watcher to the event ping. r=KrisWright
The new event is recoreded when we detect the system's memory is no longer low.
Each event object contains three numbers:

  1) how many times a tab was unloaded during the low-memory situation
  2) how many memory-pressure events were dispatched during the low-memory
     situation
  3) how long we were in the low-memory situation in seconds

These need to be collected as the event ping because the memory situation
may repeatedly be switched between low-memory and high-memory.  We want to
collect it every time the memory situation gets back to normal.  If we collect
it as the main ping (like Histogram), all numbers are summed up and we cannot
evaluate each low-memory period.

Differential Revision: https://phabricator.services.mozilla.com/D120021
2021-07-22 21:15:01 +00:00
Toshihito Kikuchi 5b5b5faee4 Bug 1720503 - Start a timer when the physical memory is low but the commit space is not low. r=haik,KrisWright
When the physical memory is low, Windows OS triggers the memory notification callback,
but we don't take any action if the commit space is not low because it is not the case
of a potential OOM crash.  The problem is in that case, we unregister the wait handle
and exit from the callback.  This means we lose a way to watch memory after that.

The proposed fix is to start a timer before exiting the callback.  We could re-register
the callback, but it could be triggered too quickly if the low-physical-but-high-commit-space
situation lasts long.  After the timer starts, the first timer handler (interval: 10 sec)
checks the commit space again, and if the commit space is still not low at that time,
we re-register the callback and stop the timer.

One tricky situation we need to consider is we don't actually start the timer while
the user is inactive.  In that case, we mark the flag `mNeedToRestartTimerOnUserInteracting`
and start the timer when the user becomes active later.  With that, `OnHighMemory` can
be executed even when we didn't in the low-memory situation.  So we need to check another
flag `mUnderMemoryPressure` and record the telemetry and send a memory-pressure-stop event
only when we were in the low-memory situation.

Differential Revision: https://phabricator.services.mozilla.com/D120022
2021-07-22 01:35:43 +00:00
Gijs Kruitbosch bcbf4ea5cd Bug 1714583 - allow nsIFile::Create to skip creating ancestor directories, to fix IOUtils::makeDirectory, to fix UNC default download folders, r=barret,xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D120338
2021-07-21 18:38:12 +00:00
Emilio Cobos Álvarez 08dccdd536 Bug 1721347 - Add OS theme info to about:support. r=Gijs,fluent-reviewers
I'm not sure what information would be useful in other OSes, so ifdef
the row for GTK for now, but I made this trivial to show in Windows /
macOS / Android as soon as they return useful information.

Differential Revision: https://phabricator.services.mozilla.com/D120331
2021-07-20 20:09:09 +00:00
Florian Quèze ca7bbcc752 Bug 1720374 - Remove MOZ_GECKO_PROFILER ifdefs that are not useful, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119810
2021-07-15 22:04:23 +00:00
Florian Quèze 292c1a1f60 Bug 1720368 - Remove MOZ_GECKO_PROFILER ifdefs around profiler_init and profiler_shutdown calls, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119809
2021-07-15 22:04:23 +00:00
Nika Layzell 7ad5d70418 Bug 1718333 - Remove unnecessary AssertLinkThread assertions, r=handyman
After looking through the methods which have this assertion, I couldn't
find any examples of places where not having a specific "link thread"
sequence would cause any issues. I think these assertions can and should
be removed.

The main change required by this was to remove the `!NS_IsMainThread()`
assertion from the SchedulerGroup listener. Due to how callbacks work,
it would be possible for a vsync message to be detected by a
MessageChannel from the main thread if it was sent before the channel
was bound. I don't believe that this change should cause any issues.

Differential Revision: https://phabricator.services.mozilla.com/D119348
2021-07-15 21:09:55 +00:00
Tom Ritter 1b9b6b72db Bug 1666222: Cut over a ton of NowUnfuzzed calls -> Now 4/5 r=smaug,extension-reviewers,zombie
With Fuzzyfox removed, Now() does what NowUnfuzzed() did.

Differential Revision: https://phabricator.services.mozilla.com/D119639
2021-07-14 18:18:17 +00:00
Tooru Fujisawa cc92ef732d Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Jan de Mooij 59f8590115 Bug 1719795 part 5 - Change JSCLASS_PRIVATE_IS_NSISUPPORTS JSClasses to use a reserved slot instead. r=mccr8,jonco
This is a step towards removing object private slots.

Classes with JSCLASS_PRIVATE_IS_NSISUPPORTS now use JSCLASS_SLOT0_IS_NSISUPPORTS
instead. For most classes this means we need to add an extra reserved slot and remove
the private slot.

Global objects (SimpleGlobalObject and the XPConnect BackstagePass and Sandbox globals)
however can use the JSCLASS_GLOBAL_APPLICATION_SLOTS already there. These slots were
only used for WebIDL DOM globals until now.

Differential Revision: https://phabricator.services.mozilla.com/D119502
2021-07-13 09:31:34 +00:00
Paul Bone 2ff6954e0f Bug 1718184 - pt 1. IdleTaskRunner now uses TimeDuration r=nika
Differential Revision: https://phabricator.services.mozilla.com/D118791
2021-07-13 01:42:32 +00:00
Alexandru Michis 4163c8f09b Merge autoland to mozilla-central. a=merge 2021-07-13 00:55:10 +03:00
Adam Gashlin 0e4dea8f8d Bug 1709131 - Report whether the current process has a package identity. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D114427
2021-07-12 19:08:10 +00:00
Mozilla Releng Treescript abd155b8ec Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2021-07-12 12:48:42 +00:00
Toshihito Kikuchi 67f9ed45ff Bug 1701368 - Part7: Add GTest to test nsAvailableMemoryWatcher. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D117675
2021-07-06 22:31:00 +00:00
Toshihito Kikuchi ee072f14eb Bug 1701368 - Part6: Tab unloading precedes memory pressure events. r=gsvelto
This is the main part to address bug 1701368.

Before this patch, `nsAvailableMemoryWatcher` directly broadcasted a memory-pressure
event when we enter into a low-memory situation and `TabUnloader` unloaded a tab in
response to the memory-pressure message.  We want to decouple `TabUnloader` from
memory-pressure listeners because unloading a tab may solve a low-memory situation
alone.

With this patch, if `nsAvailableMemoryWatcher` detects a low-memory situation,
it invokes `TabUnloader` synchronously via an XPCOM interface.  If `TabUnloader`
unloads a tab, we don't do any further action.  If there is no discardable tab,
`TabUnloader` notifies back `nsAvailableMemoryWatcher` via another XPCOM interface,
so that `nsAvailableMemoryWatcher` can notify of a memory-pressure event.

Differential Revision: https://phabricator.services.mozilla.com/D117673
2021-07-06 22:30:59 +00:00
Toshihito Kikuchi 02f0a6ddd5 Bug 1701368 - Part5: Convert nsAvailableMemoryWatcher to an XPCOM object. r=gsvelto
This patch introduces an XPCOM object which is represented by the single instance of
`nsAvailableMemoryWatcherBase` so that `nsAvailableMemoryWatcher` can synchronously
access `TabUnloader`.

We currently implement a watcher class for Windows only.  For other platforms, what
we need to do is to define a class inherinting `nsAvailableMemoryWatcherBase` and
a simple factory method `CreateAvailableMemoryWatcher()` returning an instance of
that class.

Differential Revision: https://phabricator.services.mozilla.com/D118393
2021-07-06 22:30:59 +00:00
Toshihito Kikuchi b2ce1b976f Bug 1701368 - Part4: Make the nsAvailableMemoryWatcher timer commit-space driven. r=gsvelto
This patch removes dependency on the available physical memory.
With this patch, `nsAvailableMemoryWatcher` triggers `OnLowMemory` when the available
commit space is low, and triggers `OnHighMemory` when the available commit space is
no longer low.

The key part of this change is the `if` block in `nsAvailableMemoryWatcher::Notify`,
where we use a single condition `IsCommitSpaceLow()` to declare either Low or High.

After this change, `OnLowMemory` is called not only in the main thread but also in
a worker thread.  So `StartPollingIfUserInteracting` also needs a lock to protect
`mPolling`.

Differential Revision: https://phabricator.services.mozilla.com/D117672
2021-07-06 22:30:59 +00:00
Toshihito Kikuchi b3df452cb8 Bug 1701368 - Part3: Remove the MemPressure_Ongoing request. r=gsvelto
We had `NS_DispatchMemoryPressure` and `NS_DispatchEventualMemoryPressure`
to dispatch a memory-pressure event which took `MemPressure_New` and
`MemPressure_Ongoing` to translate into "low-memory" and "low-memory-ongoing"
message respectively.

With that model, we could end up sending a wrong message if somebody
called the API with `MemPressure_Ongoing` without sending `MemPressure_New`.
To avoid that, this patch removes `MemPressure_Ongoing` and makes
the API decide whether it should dispatch a "new" event or "ongoing" event.

Differential Revision: https://phabricator.services.mozilla.com/D119122
2021-07-06 22:30:58 +00:00
Toshihito Kikuchi 6ba57254e3 Bug 1701368 - Part2: Clean up nsAvailableMemoryWatcher. r=gsvelto
1. Use `nsAutoHandle` instead of a raw `HANDLE`
2. Add a dtor with `MOZ_ASSERT`
3. Prevent double init
4. Cache `nsAvailableMemoryWatcher::mObserverSvc`

Differential Revision: https://phabricator.services.mozilla.com/D117670
2021-07-06 22:30:58 +00:00
Toshihito Kikuchi 44c4164368 Bug 1701368 - Part1: Extract nsAvailableMemoryWatcher as AvailableMemoryWatcherWin.cpp. r=gsvelto
This patch splits `nsAvailableMemoryWatcher` into 1) an nsISupports-derived class
`nsAvailableMemoryWatcherBase` and 2) a platform-specific class `nsAvailableMemoryWatcher`,
taking out the 2) part as a new file AvailableMemoryWatcherWin.cpp without any change.

Test cases for `nsAvailableMemoryWatcher` will be added by a subsequent patch.

Differential Revision: https://phabricator.services.mozilla.com/D117669
2021-07-06 22:30:57 +00:00
Butkovits Atila 785829138d Backed out 7 changesets (bug 1701368) for causing build bustages on TestMemoryPressure.cpp. CLOSED TREE
Backed out changeset 3be9f410b666 (bug 1701368)
Backed out changeset 907317341862 (bug 1701368)
Backed out changeset 38fb1e114a53 (bug 1701368)
Backed out changeset f3a475931a13 (bug 1701368)
Backed out changeset 98046adfc310 (bug 1701368)
Backed out changeset d773413513cf (bug 1701368)
Backed out changeset feca7daa9c96 (bug 1701368)
2021-07-07 00:21:34 +03:00
Toshihito Kikuchi 7868eaa3d1 Bug 1701368 - Part7: Add GTest to test nsAvailableMemoryWatcher. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D117675
2021-07-06 18:59:10 +00:00
Toshihito Kikuchi 37bb76635c Bug 1701368 - Part6: Tab unloading precedes memory pressure events. r=gsvelto
This is the main part to address bug 1701368.

Before this patch, `nsAvailableMemoryWatcher` directly broadcasted a memory-pressure
event when we enter into a low-memory situation and `TabUnloader` unloaded a tab in
response to the memory-pressure message.  We want to decouple `TabUnloader` from
memory-pressure listeners because unloading a tab may solve a low-memory situation
alone.

With this patch, if `nsAvailableMemoryWatcher` detects a low-memory situation,
it invokes `TabUnloader` synchronously via an XPCOM interface.  If `TabUnloader`
unloads a tab, we don't do any further action.  If there is no discardable tab,
`TabUnloader` notifies back `nsAvailableMemoryWatcher` via another XPCOM interface,
so that `nsAvailableMemoryWatcher` can notify of a memory-pressure event.

Differential Revision: https://phabricator.services.mozilla.com/D117673
2021-07-06 18:59:10 +00:00
Toshihito Kikuchi 42a8a18b8f Bug 1701368 - Part5: Convert nsAvailableMemoryWatcher to an XPCOM object. r=gsvelto
This patch introduces an XPCOM object which is represented by the single instance of
`nsAvailableMemoryWatcherBase` so that `nsAvailableMemoryWatcher` can synchronously
access `TabUnloader`.

We currently implement a watcher class for Windows only.  For other platforms, what
we need to do is to define a class inherinting `nsAvailableMemoryWatcherBase` and
a simple factory method `CreateAvailableMemoryWatcher()` returning an instance of
that class.

Differential Revision: https://phabricator.services.mozilla.com/D118393
2021-07-06 18:59:09 +00:00
Toshihito Kikuchi 8388201ef2 Bug 1701368 - Part4: Make the nsAvailableMemoryWatcher timer commit-space driven. r=gsvelto
This patch removes dependency on the available physical memory.
With this patch, `nsAvailableMemoryWatcher` triggers `OnLowMemory` when the available
commit space is low, and triggers `OnHighMemory` when the available commit space is
no longer low.

The key part of this change is the `if` block in `nsAvailableMemoryWatcher::Notify`,
where we use a single condition `IsCommitSpaceLow()` to declare either Low or High.

After this change, `OnLowMemory` is called not only in the main thread but also in
a worker thread.  So `StartPollingIfUserInteracting` also needs a lock to protect
`mPolling`.

Differential Revision: https://phabricator.services.mozilla.com/D117672
2021-07-06 18:59:09 +00:00
Toshihito Kikuchi 238b1bf932 Bug 1701368 - Part3: Remove the MemPressure_Ongoing request. r=gsvelto
We had `NS_DispatchMemoryPressure` and `NS_DispatchEventualMemoryPressure`
to dispatch a memory-pressure event which took `MemPressure_New` and
`MemPressure_Ongoing` to translate into "low-memory" and "low-memory-ongoing"
message respectively.

With that model, we could end up sending a wrong message if somebody
called the API with `MemPressure_Ongoing` without sending `MemPressure_New`.
To avoid that, this patch removes `MemPressure_Ongoing` and makes
the API decide whether it should dispatch a "new" event or "ongoing" event.

Differential Revision: https://phabricator.services.mozilla.com/D119122
2021-07-06 18:59:08 +00:00
Toshihito Kikuchi 9f5d899015 Bug 1701368 - Part2: Clean up nsAvailableMemoryWatcher. r=gsvelto
1. Use `nsAutoHandle` instead of a raw `HANDLE`
2. Add a dtor with `MOZ_ASSERT`
3. Prevent double init
4. Cache `nsAvailableMemoryWatcher::mObserverSvc`

Differential Revision: https://phabricator.services.mozilla.com/D117670
2021-07-06 18:59:08 +00:00
Toshihito Kikuchi 9dd46ef933 Bug 1701368 - Part1: Extract nsAvailableMemoryWatcher as AvailableMemoryWatcherWin.cpp. r=gsvelto
This patch splits `nsAvailableMemoryWatcher` into 1) an nsISupports-derived class
`nsAvailableMemoryWatcherBase` and 2) a platform-specific class `nsAvailableMemoryWatcher`,
taking out the 2) part as a new file AvailableMemoryWatcherWin.cpp without any change.

Test cases for `nsAvailableMemoryWatcher` will be added by a subsequent patch.

Differential Revision: https://phabricator.services.mozilla.com/D117669
2021-07-06 18:59:07 +00:00
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
Luca Greco 665f72549b Bug 1710917 - Introduced internal:svgContextPropertiesAllowed webextension permission. r=dholbert,mixedpuppy
This patch does change the extension-related special case in SVGContextPaint::IsAllowedForImageFromURI
to check the "internal:svgContextPropertiesAllowed" extension permission, and move the existing
criteria in the Extension class (which takes care of adding the internal permission when those
criteria as met).

This patch does not contain yet a new explicit test case for the new internal permission (which is
part of the patch build on top of this one and attached to the same bugzilla issue), but it does
pass the existing mochitest-chrome (test_chrome_ext_svg_context_fill.html).

Differential Revision: https://phabricator.services.mozilla.com/D115835
2021-06-01 14:46:03 +00:00
Edgar Chen c80e2f09d3 Bug 1712930 - Part 7: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_BE_OPENED; r=smaug,perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D116081
2021-06-01 13:10:48 +00:00
Edgar Chen 8effa3808d Bug 1712930 - Part 6: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_SENDING; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116080
2021-06-01 13:10:48 +00:00
Edgar Chen b4a690870e Bug 1712930 - Part 5: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_RESPONSE_TYPE; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116079
2021-06-01 13:10:47 +00:00
Edgar Chen 2f19ad2de5 Bug 1712930 - Part 4: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_OVERRIDE_MIME_TYPE; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116078
2021-06-01 13:10:47 +00:00
Edgar Chen 79a3f4a3a1 Bug 1712930 - Part 3: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_HAS_WRONG_RESPONSETYPE_FOR_RESPONSEXML; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116077
2021-06-01 13:10:46 +00:00
Edgar Chen bededd95ac Bug 1712930 - Part 2: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_HAS_WRONG_RESPONSETYPE_FOR_RESPONSETEXT; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116076
2021-06-01 13:10:46 +00:00
Edgar Chen 7664189944 Bug 1712930 - Part 1: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_CHUNKED_RESPONSETYPES_UNSUPPORTED_FOR_SYNC; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116075
2021-06-01 13:10:46 +00:00
Sandor Molnar 87e56c4f1a Merge mozilla-central to autoland. a=merge CLOSED TREE 2021-05-31 20:33:32 +03:00
Sandor Molnar 7b1d598d24 Backed out 7 changesets (bug 1712930) for causing damp failures. CLOSED TREE
Backed out changeset 4a03c8b2aa1a (bug 1712930)
Backed out changeset 311ccf17a01d (bug 1712930)
Backed out changeset c42f2270b5f8 (bug 1712930)
Backed out changeset b117c37b1e7e (bug 1712930)
Backed out changeset dd0ab5fc70a0 (bug 1712930)
Backed out changeset ab9bb2ee0c98 (bug 1712930)
Backed out changeset ec01575cb276 (bug 1712930)
2021-05-31 20:29:32 +03:00
Mozilla Releng Treescript e9eb869e90 Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2021-05-31 17:00:15 +00:00
Olli Pettay 73bad4abf2 Bug 1713320, ensure idle tasks get run, r=bas
If IdleTaskManager is suspended and non-idle task _is_run_, nothing seems to guarantee idle tasks get run later.
Calling UpdateCachedIdleDeadline triggers child->parent->child ipc messages if needed and ends up enabling
IdleTaskManager.

Differential Revision: https://phabricator.services.mozilla.com/D116316
2021-05-31 13:32:36 +00:00
Neil Deakin 0b4418c6a7 Bug 1696214, use moveToAnchor to position the tab and places tooltips so that the close and mute button tooltips appear correctly, r=jaws
This involves changing moveToAnchor to be allowed while the popup is showing. This change allows the buttons within the tab to use the normal algorithm for determining the tooltip position. This also fixes bug 1695900 so that tooltips for items in bookmarks menus also appear offset as well. Only the main tab and bookmarks on the toolbar appear aligned with the button's bottom edge.

Differential Revision: https://phabricator.services.mozilla.com/D115558
2021-05-31 13:07:35 +00:00
Edgar Chen 529a31571f Bug 1712930 - Part 7: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_BE_OPENED; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116081
2021-05-31 12:57:18 +00:00
Edgar Chen bd505df613 Bug 1712930 - Part 6: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_SENDING; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116080
2021-05-31 12:57:17 +00:00
Edgar Chen 71290465e8 Bug 1712930 - Part 5: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_RESPONSE_TYPE; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116079
2021-05-31 12:57:17 +00:00
Edgar Chen 8fdabf5210 Bug 1712930 - Part 4: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_OVERRIDE_MIME_TYPE; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116078
2021-05-31 12:57:16 +00:00
Edgar Chen fa6e0c0091 Bug 1712930 - Part 3: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_HAS_WRONG_RESPONSETYPE_FOR_RESPONSEXML; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116077
2021-05-31 12:57:16 +00:00
Edgar Chen a55011f761 Bug 1712930 - Part 2: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_HAS_WRONG_RESPONSETYPE_FOR_RESPONSETEXT; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116076
2021-05-31 12:57:16 +00:00
Edgar Chen b615b3fa01 Bug 1712930 - Part 1: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_CHUNKED_RESPONSETYPES_UNSUPPORTED_FOR_SYNC; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116075
2021-05-31 12:57:15 +00:00
Brindusan Cristian ca49f15f7d Backed out 14 changesets (bug 1705659, bug 472823, bug 669675) as requested by valentin for causing regressions. CLOSED TREE
Backed out changeset d920aa17a468 (bug 669675)
Backed out changeset adad38c05584 (bug 1705659)
Backed out changeset 361c177ed131 (bug 1705659)
Backed out changeset 46e559f45338 (bug 1705659)
Backed out changeset 3c9556a8df55 (bug 1705659)
Backed out changeset a179695a56c9 (bug 1705659)
Backed out changeset e688986c7011 (bug 1705659)
Backed out changeset de990e6c944d (bug 1705659)
Backed out changeset 0ea348abee78 (bug 1705659)
Backed out changeset 2f0aacbd42b1 (bug 1705659)
Backed out changeset c977551bad6e (bug 1705659)
Backed out changeset 5449d9e08034 (bug 1705659)
Backed out changeset b6b51bc167ac (bug 1705659)
Backed out changeset 27e709923ecb (bug 472823)
2021-05-31 13:16:34 +03:00
Toshihito Kikuchi 718f8615db Bug 1695817 - Part 6: Show name and publisher of an application owning a module. r=Gijs,fluent-reviewers,mhowell
This patch adds application info (Name and Publisher for now) in the
about:third-party page if a module is a part of an installed application,
which is registered in the registry and shown in Windows Control Panel.
To achieve this, we parse the registry to collect installed applications
in the background task.

Differential Revision: https://phabricator.services.mozilla.com/D109306
2021-05-28 22:35:59 +00:00
Noemi Erli e1fde28a85 Backed out 7 changesets (bug 1712930) for causing Android mochitest failures in test_onerror_message.html
Backed out changeset 4b93e808e72f (bug 1712930)
Backed out changeset f1cb609c78a0 (bug 1712930)
Backed out changeset 36e48f6e43ae (bug 1712930)
Backed out changeset b2da173c9337 (bug 1712930)
Backed out changeset d2eb6df1ec5f (bug 1712930)
Backed out changeset 78e1d6847f0a (bug 1712930)
Backed out changeset 6f842a2bf026 (bug 1712930)
2021-05-29 01:30:47 +03:00
Edgar Chen 7b47184b2c Bug 1712930 - Part 7: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_BE_OPENED; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116081
2021-05-28 21:12:13 +00:00
Edgar Chen 18ac9679bb Bug 1712930 - Part 6: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_SENDING; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116080
2021-05-28 21:12:13 +00:00
Edgar Chen 5b4acdb4c5 Bug 1712930 - Part 5: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_RESPONSE_TYPE; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116079
2021-05-28 21:12:12 +00:00
Edgar Chen a60d37c138 Bug 1712930 - Part 4: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_OVERRIDE_MIME_TYPE; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116078
2021-05-28 21:12:12 +00:00
Edgar Chen 582f4e1fe3 Bug 1712930 - Part 3: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_HAS_WRONG_RESPONSETYPE_FOR_RESPONSEXML; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116077
2021-05-28 21:12:12 +00:00
Edgar Chen ffe19c6879 Bug 1712930 - Part 2: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_HAS_WRONG_RESPONSETYPE_FOR_RESPONSETEXT; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116076
2021-05-28 21:12:11 +00:00
Edgar Chen b070511ab0 Bug 1712930 - Part 1: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_CHUNKED_RESPONSETYPES_UNSUPPORTED_FOR_SYNC; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116075
2021-05-28 21:12:10 +00:00
Kris Wright 68285a5475 Bug 1704887 - Fix a UAF in the DelayedRunnable gtests. r=xpcom-reviewers,nika
In the gtest for these patches, we can encounter a hang in the following steps:
- Monitor waits in the main thread (for async steps to finish)
- Offthread, monitor waits for the timer to fire
- Timer notifies the waiting monitors
- Monitor on the main thread continues first, wrapping up the test. It assumes all async steps are finished.
- The offthread monitor wait follows, but at this point the main thread has dereferenced the monitor. Because of this race, we run into a UAF and hang on the offthread monitor.

My solution for this is to use two monitors, and notify the outer one after we have=completed all of the async steps including the wait for the timer notification. This should avoid a race between the inner `monitor.wait()` and the free at the end of the tests.

Tentative try push for the fix: https://treeherder.mozilla.org/jobs?repo=try&revision=307960b2899b320ef5a82d276b86d633a9653941

Differential Revision: https://phabricator.services.mozilla.com/D116163
2021-05-28 19:05:30 +00:00
Kris Wright e9dca94b9d Bug 1704887 - Discard results of RemoveElement for DelayedRunnable r=necko-reviewers,xpcom-reviewers,mccr8,valentin
This silences a lint error on the previous patches in the series.

Differential Revision: https://phabricator.services.mozilla.com/D113160
2021-05-28 19:05:29 +00:00
Andreas Pehrson ca1c3d2196 Bug 1704887 - Remove assertions in OnDelayedRunnableRan. r=KrisWright,necko-reviewers,valentin
DelayedDispatch, in all current implementations, will set up a timer sync and
then Dispatch() a runnable. Since the timer is set up before the Dispatch, there
is a theoretical chance that the timer fires and dispatches a TimerEvent to the
target thread before DelayedDispatch managed to do so. When this happens the
internal DelayedDispatch runnable exits early, i.e., in practice it never runs.

The chance increases dramatically if the Dispatch() to the target in question is
tail dispatched, since the time between DelayedDispatch and the tail could be
non-trivial.

This patch removes the assert that checks that all DelayedRunnables that have
run have also been scheduled, since per the above no such guarantee exists.

Differential Revision: https://phabricator.services.mozilla.com/D112876
2021-05-28 19:05:29 +00:00
Andreas Pehrson 31a1263a94 Bug 1704887 - Add gtest for TaskQueue impl. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D112875
2021-05-28 19:05:28 +00:00
Alexandru Michis 8fbcd44dc4 Backed out 9 changesets (bug 1695817) for causing bc failures in content/aboutThirdParty.js
CLOSED TREE

Backed out changeset 6b7f451e911e (bug 1695817)
Backed out changeset ad3ea67b3d70 (bug 1695817)
Backed out changeset b4f971059f3f (bug 1695817)
Backed out changeset 9c9a928d4a70 (bug 1695817)
Backed out changeset 4a9bcb38fddf (bug 1695817)
Backed out changeset 48c0eed38628 (bug 1695817)
Backed out changeset 7583675dccb1 (bug 1695817)
Backed out changeset e3f2bed63c33 (bug 1695817)
Backed out changeset 1c45ba4fba61 (bug 1695817)
2021-05-28 21:53:41 +03:00
Sean Feng 4bbea0e5be Bug 1713327 - Use MOZ_DIAGNOSTIC_ASSERT in InputPriorityController::DidRunTask instead of MOZ_CRASH r=smaug
We should use MOZ_DIAGNOSTIC_ASSERT for the investigation, however, there's no need to crash the browser.

Differential Revision: https://phabricator.services.mozilla.com/D116247
2021-05-28 18:26:58 +00:00
Toshihito Kikuchi ad10c6f549 Bug 1695817 - Part 6: Show name and publisher of an application owning a module. r=Gijs,fluent-reviewers,mhowell
This patch adds application info (Name and Publisher for now) in the
about:third-party page if a module is a part of an installed application,
which is registered in the registry and shown in Windows Control Panel.
To achieve this, we parse the registry to collect installed applications
in the background task.

Differential Revision: https://phabricator.services.mozilla.com/D109306
2021-05-28 15:32:31 +00:00
Butkovits Atila 3735a33d14 Backed out 9 changesets (bug 1695817) for causing build bustages. CLOSED TREE
Backed out changeset 49be1caf6501 (bug 1695817)
Backed out changeset 30f1382d6058 (bug 1695817)
Backed out changeset ab9fa7f3b633 (bug 1695817)
Backed out changeset b03b122438cc (bug 1695817)
Backed out changeset 812a6bbfbe0e (bug 1695817)
Backed out changeset 3551230a7522 (bug 1695817)
Backed out changeset c7354b48fbee (bug 1695817)
Backed out changeset 4860450c2e23 (bug 1695817)
Backed out changeset 29dee289f866 (bug 1695817)
2021-05-28 07:52:30 +03:00
Toshihito Kikuchi 562f126952 Bug 1695817 - Part 6: Show name and publisher of an application owning a module. r=Gijs,fluent-reviewers,mhowell
This patch adds application info (Name and Publisher for now) in the
about:third-party page if a module is a part of an installed application,
which is registered in the registry and shown in Windows Control Panel.
To achieve this, we parse the registry to collect installed applications
in the background task.

Differential Revision: https://phabricator.services.mozilla.com/D109306
2021-05-28 04:19:07 +00:00
Butkovits Atila 711401ea39 Backed out 9 changesets (bug 1695817) for causing failures at browser_all_files_referenced.js. CLOSED TREE
Backed out changeset df4086427aaf (bug 1695817)
Backed out changeset 119a24f8be08 (bug 1695817)
Backed out changeset fd277ae2a7b8 (bug 1695817)
Backed out changeset a2c86a645fa8 (bug 1695817)
Backed out changeset c73705233fc4 (bug 1695817)
Backed out changeset 0a80eea3c0fa (bug 1695817)
Backed out changeset 9af42c7a3ca7 (bug 1695817)
Backed out changeset a2d11a0849d5 (bug 1695817)
Backed out changeset ba3ddcc28cbf (bug 1695817)
2021-05-28 03:05:09 +03:00
Toshihito Kikuchi e8ef8d92ad Bug 1695817 - Part 6: Show name and publisher of an application owning a module. r=Gijs,fluent-reviewers,mhowell
This patch adds application info (Name and Publisher for now) in the
about:third-party page if a module is a part of an installed application,
which is registered in the registry and shown in Windows Control Panel.
To achieve this, we parse the registry to collect installed applications
in the background task.

Differential Revision: https://phabricator.services.mozilla.com/D109306
2021-05-27 21:14:14 +00:00
Peter Van der Beken 3956d16cb3 Bug 1712725 - Disallow using HoldJSObjects/DropJSObjects for non-nsISupports classes that don't have a CC participant. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D116018
2021-05-27 08:35:41 +00:00
Peter Van der Beken af93c19a09 Bug 1712725 - Pass the correct object to mozilla::DropJSObjects. r=mccr8
Various code was passing 'this' to mozilla::DropJSObjects in unlink, but that's
the CC participant. The right object to pass is 'tmp'. I also added static
asserts in mozilla::Hold/DropJSObjects to block this in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115884
2021-05-27 08:35:40 +00:00
Toshihito Kikuchi 96cdb7c193 Bug 1712693 - Generate a memory report when we detect a low-memory situation. r=gsvelto
This patch reinstate the code to call `SaveMemoryReport` when we enter a low-memory
situation from a normal state, which was removed by bug 1586236.

Differential Revision: https://phabricator.services.mozilla.com/D115960
2021-05-26 17:12:25 +00:00
Gabriele Svelto 1bbc08dfb1 Bug 1712084 - Keep alive the available memory tracker during shutdown r=tkikuchi
Differential Revision: https://phabricator.services.mozilla.com/D115599
2021-05-26 13:15:27 +00:00
Edgar Chen eb9e50c536 Bug 1712861 - Get rid of NS_ERROR_DOM_INVALID_ACCESS_XHR_TIMEOUT_AND_RESPONSETYPE_UNSUPPORTED_FOR_SYNC; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D115946
2021-05-26 12:12:09 +00:00
Andi-Bogdan Postelnicu a5cd8949a1 Bug 1707096 - fix `deprecated-copy` detected by clang-trunk. r=sfink,jandem
Differential Revision: https://phabricator.services.mozilla.com/D114087
2021-05-26 10:20:32 +00:00
Valentin Gosu 69c6a23516 Bug 1705659 - Static-analysis check auto fix for auth code r=necko-reviewers,dragana
Depends on D112604

Differential Revision: https://phabricator.services.mozilla.com/D112605
2021-05-26 09:27:21 +00:00
Henrik Skupin fa4fbb78b4 Bug 1695031 - Combine build flags --disable-marionette and --enable-cdp as --disable-webdriver. r=firefox-build-system-reviewers,Gijs,smaug,keeler,jdescottes,glandium
Differential Revision: https://phabricator.services.mozilla.com/D115583
2021-05-25 09:13:28 +00:00
Toshihito Kikuchi 0b6b4d9629 Bug 1711610 - Should not trigger the memory pressure event if the available commit space is not low. r=gsvelto
After bug 1586236, we use the memory resource notification object to detect a low
memory situation on Windows, which is signaled when the available physical memory
is low.  If the available physical memory is low, however, it's possible that there
is still commit space enough for the application to run.  In such a situation, we
don't want to make aggressive efforts to reduce memory usage.

This patch makes sure we send the memory pressure event (both New and Ongoing) only
when the available commit space is lower than the threshold value defined by the pref
"browser.low_commit_space_threshold_mb".  Its default value is set to 200MB
based on our telemetry data indicating ~60% of OOM crashes with <100MB, ~75% with <300MB.

To use the pref in `nsAvailableMemoryWatcher`, this patch moves the call to
`AvailableMemoryTracker::Init()` to `XRE_mainRun()`.  It was in `NS_InitXPCOM`
because the old initialization code hooked APIs and needed to be done while
the process has only one thread (bug 741540).  The current `AvailableMemoryTracker`
does not use hooks, so it doesn't have to be initialized that early.

Differential Revision: https://phabricator.services.mozilla.com/D115605
2021-05-24 21:29:46 +00:00
Olli Pettay 19f47e75ab Bug 1708042, add control priority to the main thread, r=bas
Differential Revision: https://phabricator.services.mozilla.com/D115404
2021-05-21 15:46:45 +00:00
Iulian Moraru e0b2722506 Backed out 3 changesets (bug 1708042) for causing wr failures on background-color-animation-in-body.html.
Backed out changeset f8febc2db198 (bug 1708042)
Backed out changeset a0fccd7121b5 (bug 1708042)
Backed out changeset ddc6d95f0601 (bug 1708042)
2021-05-21 16:39:38 +03:00
Agi Sferro 114966c6e0 Bug 1701269 - Remove mobile/android/base. r=nalexander,flod,owlish
Differential Revision: https://phabricator.services.mozilla.com/D109918
2021-05-20 22:03:03 +00:00
Olli Pettay 80a68b9bcf Bug 1708042, add control priority to the main thread, r=bas
Differential Revision: https://phabricator.services.mozilla.com/D115404
2021-05-20 12:42:31 +00:00
Mike Hommey b006fe6c37 Bug 1711627 - Avoid xptdata.h being (indirectly) included so much. r=xpcom-reviewers,nika
cf. bug 1710755, touching idl files regenerates xptdata.cpp and
xptdata.h, and the latter currently triggers tons of things to be
rebuilt because xptdata.h is included from xptinfo.h, which is directly
or indirectly included in many other places.

But there's only one thing defined in xptdata.h: nsXPTInterface, and
there's actually only one place that actively uses it:
StaticComponents.cpp.in, via a function defined in xptinfo.h.

Using a forward declaration in xptinfo.h allows to only include
xptdata.h from StaticComponents.cpp.in.

While here, add an include guard to xptdata.h.

Differential Revision: https://phabricator.services.mozilla.com/D115329
2021-05-19 20:41:39 +00:00
Nika Layzell 40a0ecc65f Bug 1709935 - Support XPCOM refcount logging with rust-xpcom, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D115086
2021-05-19 17:29:23 +00:00
Nika Layzell 3a56bcbaeb Bug 1709227 - Include offset information in rust-xpcom vtables, r=mccr8
In the Itanium C++ ABI VTables contain extra fields before the virtual function
pointer list for RTTI information, and these fields are not eliminated even
when RTTI is disabled using -fno-rtti. The two relevant fields for rust-xpcom's
vtables are the "offset to top" field, which contains the displacement to the
top of the object from the corresponding vtable pointer as a `ptrdiff_t`
(`isize`), and the "typeinfo pointer" field which points to the typeinfo object
and is null when building with -fno-rtti. The VTable pointer points after these
fields to the beginning of the virtual function pointer list.

While these extra fields would generally not be accessed in -fno-rtti
situations, gcc and clang still support `dynamic_cast<void*>` even when
-fno-rtti is passed, meaning that the "offset to top" field should be present.

Although I was unable to find documentation for the C++ ABI used on Darwin, it
appears to behave the same as the Itanium C++ ABI when it comes to VTable
layout.

In order to include these fields in the manual vtables built by the rust-xpcom
macros, a `&'static VTableExtra<VTableType>` is used instead of directly using
the vtable type, and the vtable reference stored in the struct is offset into
the allocation.

As the only platform I know of to not include these extra fields is Windows,
they are generated on all non-Windows platforms.

Differential Revision: https://phabricator.services.mozilla.com/D115085
2021-05-18 20:56:40 +00:00
Nika Layzell 01fe70071d Bug 1711090 - Part 4: Remove non-string func timer names, r=KrisWright
They are not used anywhere in the codebase and come with
non-insignificant complexity which we can drop.

Differential Revision: https://phabricator.services.mozilla.com/D115267
2021-05-18 20:45:17 +00:00
Nika Layzell 3d32bd50a0 Bug 1711090 - Part 2: Allow creating a nsITimer with a std::function callback, r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D115089
2021-05-18 20:45:16 +00:00
Nika Layzell 2bf842f8bb Bug 1711090 - Part 1: Simplify nsTimerImpl's Callback implementation, r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D115088
2021-05-18 20:45:16 +00:00
Alexandru Michis 08e0f3cf36 Backed out 4 changesets (bug 1711090) for causing bustages in nsTimerImpl.cpp
CLOSED TREE

Backed out changeset 5c6f0950714d (bug 1711090)
Backed out changeset 0b6a886eea8a (bug 1711090)
Backed out changeset fc9c788ff41d (bug 1711090)
Backed out changeset ecc51d9ad027 (bug 1711090)
2021-05-18 20:25:56 +03:00
Nika Layzell 4a4b5a6171 Bug 1711090 - Part 4: Remove non-string func timer names, r=KrisWright
They are not used anywhere in the codebase and come with
non-insignificant complexity which we can drop.

Differential Revision: https://phabricator.services.mozilla.com/D115267
2021-05-18 16:24:49 +00:00
Nika Layzell 4c32cf1fe5 Bug 1711090 - Part 2: Allow creating a nsITimer with a std::function callback, r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D115089
2021-05-18 16:24:48 +00:00
Nika Layzell 4b3f75001a Bug 1711090 - Part 1: Simplify nsTimerImpl's Callback implementation, r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D115088
2021-05-18 16:24:48 +00:00
Nika Layzell 407423d88c Bug 1711100 - Remove XPCOM leak logging from nsTArray_base, r=mccr8
This is for a few reasons:

* The leak logging isn't as useful as other types of logging, as
  nsTArray_base is frequently relocated without invoking a constructor,
  such as when stored within another nsTArray. This means that
  XPCOM_MEM_LOG_CLASSES cannot be used to identify specific leaks of
  nsTArray objects.

* The nsTArray type is layout compatible with the ThinVec crate with the
  correct flags, and ThinVec does not currently perform leak logging.
  This means that if a large number of arrays are transferred between rust
  and C++ code using ThinVec, for example within another ThinVec, they
  will not be logged correctly and might appear as e.g. negative leaks.

* Leaks which have been found thanks to the leak logging added by this
  type have often not been significant, and/or have needed to be
  circumvented using some other mechanism. Most leaks found with this type
  in them also include other types which will continue to be tracked.

Differential Revision: https://phabricator.services.mozilla.com/D115087
2021-05-13 23:20:31 +00:00
Edgar Chen 72168631b0 Bug 1710845 - Get rid of NS_ERROR_DOM_INVALID_EXPRESSION_ERR; r=smaug;
Differential Revision: https://phabricator.services.mozilla.com/D114967
2021-05-12 23:32:38 +00:00
Edgar Chen acf4edd8ea Bug 1710840 - Part 2: Get rid of NS_ERROR_DOM_SVG_WRONG_TYPE_ERR; r=smaug
Depends on D114964

Differential Revision: https://phabricator.services.mozilla.com/D114965
2021-05-12 23:32:38 +00:00
Edgar Chen c681831600 Bug 1710840 - Part 1: Get rid of NS_ERROR_DOM_SVG_MATRIX_NOT_INVERTABLE; r=smaug;
Differential Revision: https://phabricator.services.mozilla.com/D114964
2021-05-12 23:32:37 +00:00
Nicolas B. Pierron a4aef929a1 Bug 1698045 part 1 - Add xpc::SelfHostedShmem to hold shared memory for JS initialization. r=smaug,tcampbell,ipc-reviewers,jld
This change adds the ground work to share content provided by the JS engine of
the Parent process to initialize the JS engine of other threads and Content
processes.

The singleton class xpc::SelfHostedShmem is used to wrap the logic behind
holding the memory. The memory is initialized with `InitFromParent` or
`InitFromChild`. The memory is accessible using either the `Content` or
`Handle`.

The shared memory is transfered through the command line using
`mozilla::ipc::ExportSharedJSInit` and read using
`mozilla::ipc::ImportSharedJSInit` functions. The command line is used, as we
need the shared memory to be avilable for the JS engine initialization. The
command line is composed of a single command named `-jsInit` which is followed
by the handle (on Windows) and the length of the shared content.

The memory associated with the shared memory is cleared in `ShutdownXPCOM` after
closing all threads, and shuting down the JS engine. This is necessary as we
expect the JS engine to borrow content from the shared memory.

Differential Revision: https://phabricator.services.mozilla.com/D110576
2021-05-12 13:57:55 +00:00
Paul Bone 831e9abe44 Bug 1629064 - pt 9. Use the current idle slice to start the GC if we can r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110378
2021-05-12 06:46:11 +00:00
Edgar Chen f10ffb593c Bug 1709217 - Part 6: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_VALUE; r=smaug
Depends on D114185

Differential Revision: https://phabricator.services.mozilla.com/D114186
2021-05-11 19:38:46 +00:00
Edgar Chen 22ee127c8b Bug 1709217 - Part 5: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_SUPPORTED; r=smaug
Depends on D114184

Differential Revision: https://phabricator.services.mozilla.com/D114185
2021-05-11 19:38:46 +00:00
Edgar Chen 0362d20990 Bug 1709217 - Part 4: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_STATE; r=smaug
Depends on D114183

Differential Revision: https://phabricator.services.mozilla.com/D114184
2021-05-11 19:38:45 +00:00
Edgar Chen d1ca0306a2 Bug 1709217 - Part 3: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_INDETERM; r=smaug
Depends on D114182

Differential Revision: https://phabricator.services.mozilla.com/D114183
2021-05-11 19:38:45 +00:00
Edgar Chen b6a7d80197 Bug 1709217 - Part 2: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_ENABLED; r=smaug
Depends on D114181

Differential Revision: https://phabricator.services.mozilla.com/D114182
2021-05-11 19:38:44 +00:00
Edgar Chen 567d46362c Bug 1709217 - Part 1: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_EXEC_COMMAND; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D114181
2021-05-11 19:38:44 +00:00
Alexandre Lissy bb8254d3dd Bug 1704683 - Avoid loop for closing fd r=jld
Differential Revision: https://phabricator.services.mozilla.com/D114088
2021-05-11 07:45:16 +00:00
Andreea Pavel 2d45c54c8f Bug 1683062 - disable 1113005.html on linux-qr r=intermittent-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D114647
2021-05-10 13:41:14 +00:00
Edgar Chen f8605ff45d Bug 1709214 - Get rid of NS_ERROR_DOM_ANIM_MISSING_PROPS_ERR; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D114179
2021-05-10 12:20:17 +00:00
Andi-Bogdan Postelnicu eab549fd19 Bug 1519636 - Initial reformat of C/C++ code with clang-format version 12.0.0. r=sylvestre
clang-format version 12.0.0 (taskcluster-KEgO7qdgQ8uaewA6NkRnRA)

Differential Revision: https://phabricator.services.mozilla.com/D114211
2021-05-10 07:15:07 +00:00
Jens Stutte 50a5a1110d Bug 1709887: Add missing #define in mingw builds. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D114569
2021-05-07 14:02:26 +00:00
Jon Coppeard 52d33f4288 Bug 1709849 - Replace use of JSGCInvocationKind with JS::GCOptions in the browser r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D114512
2021-05-07 07:39:50 +00:00
Nika Layzell 1403a31aba Bug 1706365 - Part 2: Add tests for mozilla::Queue, r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D114523
2021-05-06 20:05:34 +00:00
Nika Layzell 151f89a2ab Bug 1706365 - Part 1: Safely invoke destructors and constructors in mozilla::Queue, r=xpcom-reviewers,kmag
This allows the `mozilla::Queue` type to be used more easily and without
causing assertion failures, leaks, or unsafe behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D112763
2021-05-06 20:05:34 +00:00
Nika Layzell ddfc865bf0 Bug 1706376 - Remove loud warning from BlockingResourceBase::Release(), r=xpcom-reviewers,mccr8
This warning previously fired loudly from the ports logic being added in bug
1706374 were acquired. As the warning also occasionally fires in existing code
and provides no safety guarantees, I think we should consider removing it.

Differential Revision: https://phabricator.services.mozilla.com/D112762
2021-05-06 20:05:33 +00:00
Alexandru Michis 574bea557a Backed out 14 changesets (bug 1705659, bug 472823, bug 669675) for causing bustages in nsHttpChannelAuthProvider.cpp
CLOSED TREE

Backed out changeset 42561f42313d (bug 669675)
Backed out changeset 2aee05c2d6f3 (bug 1705659)
Backed out changeset ff4348e0a307 (bug 1705659)
Backed out changeset 897868e22c81 (bug 1705659)
Backed out changeset c808bf01dfe8 (bug 1705659)
Backed out changeset 5c13ec25cc2e (bug 1705659)
Backed out changeset 4337214c8846 (bug 1705659)
Backed out changeset 18d3a604336a (bug 1705659)
Backed out changeset 3af362aa2b25 (bug 1705659)
Backed out changeset 36eff14cf2ea (bug 1705659)
Backed out changeset 8af29f96ac77 (bug 1705659)
Backed out changeset eab68e8bea29 (bug 1705659)
Backed out changeset 05492b6578a9 (bug 1705659)
Backed out changeset 3259a8cb3db1 (bug 472823)
2021-05-06 17:37:17 +03:00
Jens Stutte f2f68509d3 Bug 1690326: Add mappings for ERROR_DEVICE_HARDWARE_ERROR, ERROR_DEVICE_NOT_CONNECTED, ERROR_DISK_FULL and remove error NS_ERROR_FILE_DISK_FULL in favor of existing NS_ERROR_FILE_NO_DEVICE_SPACE r=xpcom-reviewers,necko-reviewers,nika,valentin
Win32 errors ERROR_DEVICE_HARDWARE_ERROR, ERROR_DEVICE_NOT_CONNECTED, ERROR_DISK_FULL need a mapping.
NS_ERROR_FILE_DISK_FULL is duplicate to NS_ERROR_FILE_NO_DEVICE_SPACE
Drive by: RejectJSPromise lacked some NS_ERROR_* mappings

Differential Revision: https://phabricator.services.mozilla.com/D113974
2021-05-06 14:00:06 +00:00
Valentin Gosu ec981ec694 Bug 1705659 - Static-analysis check auto fix for auth code r=necko-reviewers,dragana
Depends on D112604

Differential Revision: https://phabricator.services.mozilla.com/D112605
2021-05-06 13:17:23 +00:00
Christian Holler ad1556611a Bug 1709559 - Avoid using PL_str implementations when fuzzing network. r=valentin,necko-reviewers,xpcom-reviewers,KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D114347
2021-05-05 18:09:28 +00:00
Toshihito Kikuchi fee87c9b39 Bug 1705579 - Skip WinIOAutoObservation if TLS is not available. r=gerald,aklotz
We hook several file APIs to record I/O performance data.  Since TLS is not
allocated in ntdll's loader worker thread, however, if someone does a file
operation, we hit read AV because `WinIOAutoObservation` uses `nsString` and
a thread local variable.

Currently we can see this crash happens only when a DLL rule of AppLocker is
defined, but theoretically this can happen when any module loaded in a worker
thread does file operation in its entrypoint.

The proposed fix is to skip `WinIOAutoObservation` if TLS is not available.

Differential Revision: https://phabricator.services.mozilla.com/D113032
2021-05-05 17:00:09 +00:00
Jesse Schwartzentruber 24ef473acb Bug 1708409 - Include libFuzzer in xpcshell r=decoder
libFuzzer is already included in the firefox binary, so including it in
libxul is problematic.

Differential Revision: https://phabricator.services.mozilla.com/D113899
2021-04-30 17:46:15 +00:00
Dorel Luca 440b9916fe Backed out 2 changesets (bug 1707924) for multiple failures with crash [@ BackgroundEventTarget::CreateBackgroundTaskQueue(char const*)]. CLOSED TREE
Backed out changeset 7fda47840322 (bug 1707924)
Backed out changeset c6213e0b8024 (bug 1707924)
2021-04-30 06:20:24 +03:00
Dorel Luca 67f232e72a Backed out changeset 1d91ad1c6c6e (bug 1704391) for multiple failures in xpcom/threads/nsTimerImpl.cpp. CLOSED TREE 2021-04-30 06:17:37 +03:00
kriswright 46818f47fb Bug 1707924 - Assert on DelayedRunnable dispatch on non debug builds. r=xpcom-reviewers,nika
This assertion currently only happens on debug builds, but attempts to dispatch delayed runnables after we have started or finished cancelling all delayed runnables in a TaskQueue may be causing shutdown hangs.

Differential Revision: https://phabricator.services.mozilla.com/D113839
2021-04-30 00:58:48 +00:00
kriswright b606492691 Bug 1707924 - Disallow creation of new TaskQueues after we have begun threads shutdown r=xpcom-reviewers,nika
I discovered today an order of events that causes a hang:
- A background TaskQueue is created after we [begin threads shut down](https://searchfox.org/mozilla-central/rev/759872688df15a5d6ab305ffe39d90450590bfec/xpcom/build/XPCOMInit.cpp#625)
- The task queue enters shut down, and attempts to [cancel delayed runnables] (https://searchfox.org/mozilla-central/rev/37edd2782e67e716dd07a85016da07b4d6275e5d/xpcom/threads/TaskQueue.cpp#163)
- The task queue [dispatches a runnable](https://searchfox.org/mozilla-central/rev/37edd2782e67e716dd07a85016da07b4d6275e5d/xpcom/threads/TaskQueue.cpp#140) which clears its delayed runnables
- Because delayed runnables are canceled before we stop servicing new threads, most TaskQueue clear this step. But if you create one at this part of shutdown, you dispatch it to a threadpool that cannot create new threads, so if there are no active threads this dispatch will not be serviced.

We could just change how to dispatch delayed runnable cancel tasks, but I think the best solution is to outright forbid the creation of new background TaskQueues after we have begun shutdown. Since this problem is specific to the way background task queue shut down, I don't want to change the behavior of any unrelated task queue who dispatch delayed runnables and shut down in their own time.

Differential Revision: https://phabricator.services.mozilla.com/D113449
2021-04-30 00:58:47 +00:00
kriswright ed84376d75 Bug 1704391 - Address timers cancelled after timer shutdown. r=xpcom-reviewers,nika
There is a chance that a timer will be cancelled by its holder after the timer thread and all of the timers have been cleaned up. Doing this can result in a hang on the mutex lock, likely because the mutex is now pointing to something else. I'm not completely familiar with the inner workings of our timers so I'm not sure what the best fix is here. I decided to follow a pattern in our threading shutdown routines and flag the timer shutdown so the timers can't attempt to cancel past a certain point where they would be shutdown anyway. This is tricky because there are timers created during XPCOM shutdown all the way up until we shutdown the timer thread. Checking for the timer thread outside of the lock could also result in a race with timer shutdown. This value is an attempt to address this without breaking timers shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D113448
2021-04-30 00:58:42 +00:00
Sean Feng 53d05dfbc0 Bug 1708070 - Use VsyncTaskManager::WillRunTask to change InputVsyncState r=smaug
Currently, we use `VsyncTaskManager::DidRunTask` to change state from
`RunVsync` to `NoPendingVsync`, however, the issue is that if the vsync
starts an event loop (for instance, by using requestAnimationFrame), and
the event loop starts another input task, Firefox crashes because input
tasks don't expect the state to be `RunVsync`.

So instead of using `DidRunTask`, we start to use `WillRunTask` to fix
it.

Differential Revision: https://phabricator.services.mozilla.com/D113613
2021-04-29 16:39:30 +00:00
Steve Fink 600f475b8f Bug 1703374 - Provide SliceBudget users with more control of when and how often time checks happen r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D111008
2021-04-28 16:37:32 +00:00
Bas Schouten 1055294cdd Bug 1640852: Grab IVirtualDesktopManager object off the main thread on the creation of the first nsWindow. r=mikedeboer,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D113446
2021-04-28 12:28:56 +00:00
Valentin Gosu de35210ee3 Bug 1574475 - Remove FTP error codes r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111249
2021-04-28 09:33:46 +00:00
David Parks c99bc3e206 Bug 1704658: Implement ParamTraits for RefPtr<nsAtom> r=nika
Serialization for both nsStaticAtoms and nsDynamicAtoms.

Differential Revision: https://phabricator.services.mozilla.com/D112433
2021-04-27 08:20:18 +00:00
Cosmin Sabou 6be9f38faa Backed out changeset a89d4817a3cf (bug 1703374) for causing bustages and SliceBudget related crashes. CLOSED TREE 2021-04-27 02:09:01 +03:00
Steve Fink a559ffee38 Bug 1703374 - Provide SliceBudget users with more control of when and how often time checks happen r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D111008
2021-04-26 22:38:31 +00:00
Sean Feng dbf5f9f56b Bug 1706794 - Remove a MOZ_ASSERT from InputTaskManager.cpp r=smaug
This assertion is no longer making sense after the changes we made in
bug 1705251.

Differential Revision: https://phabricator.services.mozilla.com/D113166
2021-04-26 14:27:14 +00:00
Andreea Pavel bc7b15f9cf Backed out 3 changesets (bug 1704887) for Gtest failures on a CLOSED TREE
Backed out changeset 211dcc933514 (bug 1704887)
Backed out changeset bde076bfca7e (bug 1704887)
Backed out changeset 34e875f85b88 (bug 1704887)
2021-04-23 03:40:57 +03:00
Kris Wright aa02bb3f95 Bug 1704887 - Discard results of RemoveElement for DelayedRunnable r=necko-reviewers,xpcom-reviewers,mccr8,valentin
This silences a lint error on the previous patches in the series.

Differential Revision: https://phabricator.services.mozilla.com/D113160
2021-04-22 21:32:39 +00:00
Andreas Pehrson a8ff610593 Bug 1704887 - Remove assertions in OnDelayedRunnableRan. r=KrisWright,necko-reviewers,valentin
DelayedDispatch, in all current implementations, will set up a timer sync and
then Dispatch() a runnable. Since the timer is set up before the Dispatch, there
is a theoretical chance that the timer fires and dispatches a TimerEvent to the
target thread before DelayedDispatch managed to do so. When this happens the
internal DelayedDispatch runnable exits early, i.e., in practice it never runs.

The chance increases dramatically if the Dispatch() to the target in question is
tail dispatched, since the time between DelayedDispatch and the tail could be
non-trivial.

This patch removes the assert that checks that all DelayedRunnables that have
run have also been scheduled, since per the above no such guarantee exists.

Differential Revision: https://phabricator.services.mozilla.com/D112876
2021-04-22 21:32:39 +00:00
Andreas Pehrson f8b3146ebe Bug 1704887 - Add gtest for TaskQueue impl. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D112875
2021-04-22 21:32:38 +00:00
Emilio Cobos Álvarez 15f6b60e34 Bug 1706960 - Add datetime-local to StaticAtoms.py. r=smaug
This will allow it to be used from UA sheets (we need static atoms there
to share UA sheets with other processes).

Depends on D113114

Differential Revision: https://phabricator.services.mozilla.com/D113115
2021-04-22 15:14:33 +00:00
Narcis Beleuzu 33cc31099d Backed out 8 changesets (bug 1574475, bug 1699222) for build bustages on moz.build . CLOSED TREE
Backed out changeset 6c2c039872b3 (bug 1574475)
Backed out changeset 8a2a04743c5f (bug 1699222)
Backed out changeset 9437c60798d6 (bug 1574475)
Backed out changeset 7ef1884ac11b (bug 1574475)
Backed out changeset ec8c237d5298 (bug 1574475)
Backed out changeset 4a760b3f5d53 (bug 1574475)
Backed out changeset b229b0eea1e7 (bug 1574475)
Backed out changeset 03d34a2f10a6 (bug 1574475)
2021-04-22 18:10:59 +03:00
Valentin Gosu db2d8bb0bc Bug 1574475 - Remove FTP error codes r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111249
2021-04-22 13:41:34 +00:00
Sean Feng e4010e70f8 Bug 1705251 - InputTaskManager should expect vsync to run when the input vsync state is InputVsyncState::HasPendingVsync r=smaug
We have seen a lot of crashes with the new vsync input alignment code
because a possible case is
  1. Input event runs when there's a pending vsync (state=HasPendingVsync)
  2. Input event handler starts an event loop (state=HasPendingVsync)
  3. Vsync runs (state=HasPendingVsync) and crashes.

It crashes because the `DidRunTask` method for the input event doesn't
get a chance to run, which supposes to set the state to RunVsync.

Differential Revision: https://phabricator.services.mozilla.com/D112799
2021-04-21 14:46:26 +00:00
Gerald Squelart d67d35f1e3 Bug 1704654 - Display MOZ_LOG markers in marker chart as well - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D111742
2021-04-21 08:16:53 +00:00
Randell Jesup ea0d4c8068 Bug 1602862: Add checks for invalid StringClassFlags r=jld
Differential Revision: https://phabricator.services.mozilla.com/D99271
2021-04-20 19:34:03 +00:00