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

21249 Коммитов

Автор SHA1 Сообщение Дата
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