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

22502 Коммитов

Автор SHA1 Сообщение Дата
Jon Coppeard 6c1156b96e Bug 1813556 - Expose finalization registry callback objects to active JS r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D168423
2023-02-01 09:07:23 +00:00
Andrew Osmond b87e7bad97 Bug 1811981 - Add ability to run both x86 and ARM Widevine plugins on Windows ARM. r=jld
This patch adds the ability for Windows on ARM to launch either x86 or
ARM Widevine plugins. It also adds the ability for Windows on x86 to
refuse ARM binaries in case, for example, a profile is transferred
between machines.

Overall this should be a non-functional change for users at the time of
landing. It does however allow us to ship the ARM Widevine plugin to
Windows ARM users to workaround a plugin crash with the x86 Widevine
plugin. This only affects Windows 10 users (Windows 11 works fine).

Differential Revision: https://phabricator.services.mozilla.com/D167634
2023-01-31 20:57:11 +00:00
Andrew McCreight 6f4aa4f64f Bug 1681586 - Remove include guard around XPIDL compiler includes. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D168318
2023-01-31 20:42:22 +00:00
Nika Layzell 8d5ea433cf Bug 1810615 - Update the async-task crate, r=supply-chain-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D168175
2023-01-31 20:35:32 +00:00
serge-sans-paille da45a5a7c1 Bug 1811934 - Have nsID::ToString() return an managed string instead of a raw pointer r=xpcom-reviewers,nika
And use nsID::ToProvidedString(...) method when suitable.

This naturally fixes a memory leak in dom/fetch/FetchParent.cpp.

Differential Revision: https://phabricator.services.mozilla.com/D167606
2023-01-31 16:44:04 +00:00
Olli Pettay b10f170599 Bug 1812753 - Move xpcom/ds/MruCache.h to mfbt/, r=glandium
The gtest lives still in xpcom/tests/gtest/TestMruCache.cpp since it relies on nsString.

Differential Revision: https://phabricator.services.mozilla.com/D168007
2023-01-31 17:59:25 +00:00
Norisz Fay 73c377bc06 Backed out changeset 7d4b830c1cf6 (bug 1811934) for causing wpt failures on pointerevent_pointerrawupdate_in_pointerlock.html CLOSED TREE 2023-01-31 21:44:59 +02:00
serge-sans-paille 2dfe139f78 Bug 1811934 - Have nsID::ToString() return an managed string instead of a raw pointer r=xpcom-reviewers,nika
And use nsID::ToProvidedString(...) method when suitable.

This naturally fixes a memory leak in dom/fetch/FetchParent.cpp.

Differential Revision: https://phabricator.services.mozilla.com/D167606
2023-01-31 16:44:04 +00:00
Andrew McCreight 18ccf5cbcc Bug 1813856 - Update BUG_COMPONENT in xpcom/base to use the new component for nsCycleCollect* files. r=smaug DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D168320
2023-01-31 00:50:14 +00:00
Olli Pettay 525a2026d3 Bug 1813344, don't allocate unnecessarily in nsTSubstring<T>::StripTaggedASCII, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D168210
2023-01-30 17:09:30 +00:00
Narcis Beleuzu 9e96e91239 Backed out 3 changesets (bug 1812275, bug 1812035, bug 1806501) for bc failures on browser_aboutprocesses_default_options.js .
Backed out changeset 4f13d8470d97 (bug 1806501)
Backed out changeset a276a2939cee (bug 1812275)
Backed out changeset 67775732c1a8 (bug 1812035)
2023-01-27 17:14:57 +02:00
Jan-Niklas Jaeschke fa75d3a60f Bug 1803355: Basic implementation of Custom Highlight API. r=edgar,emilio
Added WebIDL interfaces as per spec, added some necessary changes to support maplike and setlike structures to be accessed from C++.

Added `::highlight(foo)` pseudo element to CSS engine.

Implemented Highlight as new kind of `Selection` using `HighlightType::eHighlight`. This implies Selections being added/removed during runtime (one `Selection` object per highlight identifier), therefore a dynamic container for highlight `Selection` objects was added to `nsFrameSelection`. Also, the painting code queries the highlight style for highlight Selections.

Implementation is currently hidden behind a pref `dom.customHighlightAPI.enabled`.

Differential Revision: https://phabricator.services.mozilla.com/D164203
2023-01-27 11:42:18 +00:00
Andreas Farre 9956dde6c8 Bug 1812035 - Fix broken about:memory tests. r=smaug
Tests for about:memory doesn't know about utility processes. Make sure
to hide the utility process reporter when needed, and count the number
of living processes, also when needed.

Differential Revision: https://phabricator.services.mozilla.com/D167662
2023-01-27 09:17:16 +00:00
Andrew McCreight caf3f02b3f Bug 1809002 - Document cycle collector macros. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D166234
2023-01-25 00:43:46 +00:00
Sandor Molnar b6d0a71936 Backed out 2 changesets (bug 1812035, bug 1806501) for causing bc failures in ipc/glue/test/browser/browser_utility_audioDecodeCrash.js CLOSED TREE
Backed out changeset d7f1a776a986 (bug 1806501)
Backed out changeset 4a44daa59af4 (bug 1812035)
2023-01-24 18:31:34 +02:00
Sandor Molnar 4c4d29b581 Backed out changeset d7f27aa40260 (bug 1803355) for causing win build bustage. 2023-01-24 18:07:50 +02:00
Andreas Farre c71e5fdf12 Bug 1812035 - Fix broken about:memory tests. r=smaug
Tests for about:memory doesn't know about utility processes. Make sure
to hide the utility process reporter when needed, and count the number
of living processes, also when needed.

Differential Revision: https://phabricator.services.mozilla.com/D167662
2023-01-24 15:37:49 +00:00
Gabriele Svelto 15785ab3b7 Bug 1806410 - Allow sending crash pings for all processes except for testing-only ones r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D167155
2023-01-24 13:19:10 +00:00
Jan-Niklas Jaeschke 1b3bff372b Bug 1803355: Basic implementation of Custom Highlight API. r=edgar,emilio
Added WebIDL interfaces as per spec, added some necessary changes to support maplike and setlike structures to be accessed from C++.

Added `::highlight(foo)` pseudo element to CSS engine.

Implemented Highlight as new kind of `Selection` using `HighlightType::eHighlight`. This implies Selections being added/removed during runtime (one `Selection` object per highlight identifier), therefore a dynamic container for highlight `Selection` objects was added to `nsFrameSelection`. Also, the painting code queries the highlight style for highlight Selections.

Implementation is currently hidden behind a pref `dom.customHighlightAPI.enabled`.

Differential Revision: https://phabricator.services.mozilla.com/D164203
2023-01-24 11:46:28 +00:00
Sandor Molnar a610ef723a Backed out changeset 54771a1963b6 (bug 1803355) for causing win build bustage. CLOSED TREE 2023-01-24 12:17:49 +02:00
Peter Van der Beken 35f615378f Bug 1811858 - Remove some unused DOM error codes. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D167568
2023-01-24 09:02:35 +00:00
Jan-Niklas Jaeschke 99eb703228 Bug 1803355: Basic implementation of Custom Highlight API. r=edgar,emilio
Added WebIDL interfaces as per spec, added some necessary changes to support maplike and setlike structures to be accessed from C++.

Added `::highlight(foo)` pseudo element to CSS engine.

Implemented Highlight as new kind of `Selection` using `HighlightType::eHighlight`. This implies Selections being added/removed during runtime (one `Selection` object per highlight identifier), therefore a dynamic container for highlight `Selection` objects was added to `nsFrameSelection`. Also, the painting code queries the highlight style for highlight Selections.

Implementation is currently hidden behind a pref `dom.customHighlightAPI.enabled`.

Differential Revision: https://phabricator.services.mozilla.com/D164203
2023-01-24 07:36:13 +00:00
Noemi Erli aec839cbc8 Backed out changeset 759d4948ed8b (bug 1803355) for causing build bustages CLOSED TREE 2023-01-22 05:03:04 +02:00
Jan-Niklas Jaeschke 0a52844148 Bug 1803355: Basic implementation of Custom Highlight API. r=edgar,emilio
Added WebIDL interfaces as per spec, added some necessary changes to support maplike and setlike structures to be accessed from C++.

Added `::highlight(foo)` pseudo element to CSS engine.

Implemented Highlight as new kind of `Selection` using `HighlightType::eHighlight`. This implies Selections being added/removed during runtime (one `Selection` object per highlight identifier), therefore a dynamic container for highlight `Selection` objects was added to `nsFrameSelection`. Also, the painting code queries the highlight style for highlight Selections.

Implementation is currently hidden behind a pref `dom.customHighlightAPI.enabled`.

Differential Revision: https://phabricator.services.mozilla.com/D164203
2023-01-22 02:04:43 +00:00
Justin Link 4c8cfc513c Bug 1787974 - Remove leading canceled timers before deciding if we added a new front timer r=smaug
Due to the possible presence of canceled timers at the "front" of the
list, mTimers[0] won't necessarily hold the next timer to be fired
unless we've cleaned up those front timers recently.

Differential Revision: https://phabricator.services.mozilla.com/D166575
2023-01-20 17:11:13 +00:00
Justin Link e2a49f1133 Bug 1787974 - Fixed small logic change in FindNextFireTimeForCurrentThread(). r=smaug
I also took a stab at documenting the behavior since I found it a bit
difficult to follow.

Differential Revision: https://phabricator.services.mozilla.com/D165120
2023-01-20 17:11:12 +00:00
Justin Link 9ca4dc4b49 Bug 1787974 - Fixed problem where AddTimerInternal() could add a new timer in the wrong spot. r=smaug
The previous version used IndexOfFirstElementGt which is implemented
with a binary search. That doesn't work correctly because the mTimers
array that is being searched is maintained in sorted order
*only if the "cancelled" timers are skipped*. This revision replaces the
binary search with a linear search which can handle this without
problem. Given that the number of timers present at any one time is
fairly modest, a linear search is probably a more appropriate choice
anyway.

Also added a new function, VerifyTimerListConsistency, which is called
once per wake-up in the main loop and enabled only in DEBUG builds, that
checks mTimers for ordering and consistency.

Differential Revision: https://phabricator.services.mozilla.com/D164294
2023-01-20 17:11:12 +00:00
Gerald Squelart 0b24e570d5 Bug 1787974 - AddTimerInternal efficiently inserts by shifting entries until next gap r=smaug
This makes the code more complex, but it is needed to keep this most-used
function efficient related to its old implementation using `std::push_heap`.

Differential Revision: https://phabricator.services.mozilla.com/D164292
2023-01-20 17:11:11 +00:00
Gerald Squelart 44782bb70f Bug 1787974 - Changing mTimers from heap to timestamp-sorted array r=smaug
Inserting elements in the sorted array is more costly than pushing to a binary
heap, but this is balanced by the removal of indirections and de/allocations,
and the upcoming re-use of empty entries.

In the end, this change is necessary to allow future improvements like timer-
coalescing, where we'll need to see multiple timers in order.

Bonus: FindNextFireTimeForCurrentThread changes a lot, because it used to have
to `pop_heap` elements and then `push_heap` them back! (Sometimes resulting in
subtle changes for timers with the same timeout.) So this one benefits the
most.

Differential Revision: https://phabricator.services.mozilla.com/D164291
2023-01-20 17:11:11 +00:00
Gerald Squelart 13d9522fb8 Bug 1787974 - In TimerThread::Shutdown, only Take non-null entries r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D164290
2023-01-20 17:11:11 +00:00
Gerald Squelart 13199d27f5 Bug 1787974 - Entry::Forget doesn't need a parameter r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D164289
2023-01-20 17:11:10 +00:00
Gerald Squelart 8a00602e7d Bug 1787974 - Entry constructor only takes an nsTimerImpl* r=smaug
So entries now store the given timeout value (instead of clamping it to after "now").
And we store this timeout first, as it's accessed more frequently.

Differential Revision: https://phabricator.services.mozilla.com/D164288
2023-01-20 17:11:09 +00:00
Gerald Squelart 2254f41c15 Bug 1787974 - TimerThread stores Entry's instead of UniquePtrs to Entry's r=smaug
This removes memory heap allocations and deallocations, and indirections to access entries.

Differential Revision: https://phabricator.services.mozilla.com/D164287
2023-01-20 17:11:09 +00:00
Gerald Squelart 38ae7225cd Bug 1787974 - nsTimerImpl directly keeps track of whether it's in a TimerThread::Entry r=smaug
nsTimerImplHolder can now be removed.

Differential Revision: https://phabricator.services.mozilla.com/D164286
2023-01-20 17:11:08 +00:00
Gerald Squelart fdae1596bd Bug 1787974 - Do a linear search in RemoveTimerInternal to stop going through the holder r=smaug
Note that it's about 4 times slower in practice! But this will be balanced in later patches.

Differential Revision: https://phabricator.services.mozilla.com/D164285
2023-01-20 17:11:08 +00:00
Gerald Squelart bfb631bb92 Bug 1787974 - Style: Put Entry private section at the bottom of the class r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D164284
2023-01-20 17:11:08 +00:00
Gerald Squelart d037d2b5a5 Bug 1787974 - Only nsTimerImplHolder::Forget needs to be public r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D164283
2023-01-20 17:11:07 +00:00
Emilio Cobos Álvarez 20d4fcf500 Bug 1791442 - Explicitly check for SNAP_NAME of MOZ_APP_NAME to detect Snap. r=mkaply,jmaher,xpcom-reviewers,nika
Make snap xpcshell tests run with the right environment variables
instead of tweaking them at runtime.

Differential Revision: https://phabricator.services.mozilla.com/D166523
2023-01-19 10:52:41 +00:00
Iulian Moraru 48c1ab021b Backed out changeset 60cda7d831ca (bug 1791442) for causing bc failures on browser_ua_snap_ubuntu.js. 2023-01-19 07:56:39 +02:00
Emilio Cobos Álvarez 087a17b9bd Bug 1791442 - Explicitly check for SNAP_NAME of MOZ_APP_NAME to detect Snap. r=mkaply,jmaher,xpcom-reviewers,nika
Make snap xpcshell tests run with the right environment variables
instead of tweaking them at runtime.

Differential Revision: https://phabricator.services.mozilla.com/D166523
2023-01-19 01:02:59 +00:00
Nika Layzell 7bb275a4c4 Bug 1804564 - Respect aCount better in EncodeInputStream, r=mccr8,necko-reviewers,jesup
Previously we'd always read the full stream, but if an aCount lower than
the actual size of the stream is provided, we should only encode that
many bytes.

This patch also improves handling of streams shorter than aCount bytes,
ensuring that the generated string is of the correct length.

Differential Revision: https://phabricator.services.mozilla.com/D166616
2023-01-18 22:03:18 +00:00
Olli Pettay 8036dca628 Bug 1810981 - Remove unused SchedulerGroup member variables, r=farre
Depends on D167143

Differential Revision: https://phabricator.services.mozilla.com/D167144
2023-01-18 14:33:00 +00:00
Olli Pettay 19068eab11 Bug 1810975 - remove unused MarkVsyncReceived()/MarkVsyncRan(), r=farre
Differential Revision: https://phabricator.services.mozilla.com/D167143
2023-01-18 14:32:59 +00:00
alwu 470b9ff545 Bug 1808804 - part1 : return a new error when the MF CDM process crashes. r=jolin
Differential Revision: https://phabricator.services.mozilla.com/D166409
2023-01-17 20:00:46 +00:00
Artur Iunusov c4ec4d7309 Bug 1671548 - Remove fission experiment support code and prefs, r=smaug,
r=tritter

- backed out changesets: 1660057, 1667426, 1674214,
1669749, 1685801, 1667381
- fission.experiment support removed everywhere, including telemetry

Differential Revision: https://phabricator.services.mozilla.com/D165169
2023-01-17 10:05:36 +00:00
Nika Layzell 9d6bb19c23 Bug 1809753 - Part 4: Remove unnecessary GetMainThreadEventTarget, r=mccr8
This method always returned GetMainThreadSerialEventTarget(). This patch
switches all callers over to use that method instead.

We can't easily switch all calls to be calls to NS_GetMainThread(), as there is
no version of that method returning a bare nsIThread* instance.

I didn't introduce one, as we may want to add a lock around mMainThread in the
future, which would require removing nsThreadManager::GetMainThreadWeak. As
this method only returns nsISerialEventTarget, it method could remain
implemented, however, by returning a statically allocated fake event target
which forwards dispatches (and QIs to nsIThread) to the real main thread.

Differential Revision: https://phabricator.services.mozilla.com/D166608
2023-01-16 23:14:12 +00:00
Nika Layzell 852d02ec16 Bug 1809753 - Part 3: Replace all callers of GetCurrentEventTarget with GetCurrentSerialEventTarget, r=mccr8,necko-reviewers,valentin
This only changes the behaviour when called with a TaskQueue or other type
using SerialEventTargetGuard on the stack. They are being switched over as the
existing GetCurrentEventTarget method is being removed, as it is somewhat
confusing, and poorly documented.

Callers which need to get the current thread even when on a threadpool or
behind a TaskQueue were switched to GetCurrentEventTarget in the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D166607
2023-01-16 23:14:11 +00:00
Nika Layzell 5ecd567c87 Bug 1809753 - Part 2: Switch some calls to GetCurrentEventTarget() to NS_GetCurrentThread, r=mccr8
These callers are depending on the existing behaviour which always returns a
thread, and does not respect custom TaskQueues. In the next part, all remaining
callers will be switched to GetCurrentSerialEventTarget.

Differential Revision: https://phabricator.services.mozilla.com/D166606
2023-01-16 23:14:11 +00:00
Nika Layzell 59be033e1c Bug 1809753 - Part 1: Remove quantum-dom nsIThread::EventTarget methods, r=mccr8
We aren't likely to try to make these changes any time soon, so cleaning out
these unnecessary methods which just return `this` will simplify things.

I was unable to find any calls to the `.eventTarget` getter in JS, which makes
sense, as the nsIThread type is only really used in JS as a wrapper around the
main thread in older code. Because of that, it has been removed as well.

Differential Revision: https://phabricator.services.mozilla.com/D166605
2023-01-16 23:14:10 +00:00
Nika Layzell 0a38e985a1 Bug 1809752 - Part 2: Assert if GetCurrentSerialEventTarget is called on a thread pool with no active TaskQueue, r=mccr8
This will help catch issues such as the one from bug 1806751, as we will assert
earlier in the process. This also aligns better with the existing documentation
of the method (which has been updated), which suggests that the method would
assert if called on a thread pool.

Differential Revision: https://phabricator.services.mozilla.com/D166604
2023-01-16 23:14:10 +00:00