Commit Graph
146 Commits
Author SHA1 Message Date
Helena bff5b3bd4f Bug 825914 - Use wake lock to keep OS from sleeping during downloads. r=mac-reviewers,win-reviewers,gstoll,bradwerth,mak,Thinker
Differential Revision: https://phabricator.services.mozilla.com/D294787
2026-05-21 19:21:31 +00:00
Sylvestre Ledru 4f6b8b516d Bug 2023419 - Remove Emacs/Vim modelines from widget/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287877
2026-03-16 17:22:02 +00:00
Emilio Cobos Álvarez 6a9374258b Bug 2014945 - Avoid \n in NS_WARNING. r=stransky,necko-reviewers,webrtc-reviewers,dbaker
It is not needed and makes the warning filename and so on show up in a
different line.

Differential Revision: https://phabricator.services.mozilla.com/D282098
2026-02-06 08:45:22 +00:00
Bob Owen f1caff7d2f Bug 1998165 - Only run LSPAnnotate in the parent. r=gstoll,win-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D271226
2025-11-04 20:19:36 +00:00
Greg Stoll 5f39ebf46d Bug 1968297 - explicitly refresh thumbnail after windows are restored and resized r=win-reviewers,handyman
This is yet another attempt to get reasonable-looking thumbnails in the
taskbar for restored windows after they get resized. This time we're
actually signaling to invalidate the current thumbnail after the window
gets restored, which I'm hopeful will fix the issue.

As usual, this all works on my machine with a dev build :-/

Differential Revision: https://phabricator.services.mozilla.com/D269422
2025-10-22 18:54:43 +00:00
David P 686fcb0b89 Bug 1551856: Move AudioSession to LayoutStatics r=mccr8,win-reviewers,gstoll
This allows us to shut down the IAudioSessionManager after Cubeb has stopped,
so there shouldn't be STA apartment deadlock issues with it.
IAudioSessionManager's shutdown always requires the STA.  This patch eliminates
MTA threads involvement at shutdown, which was previously needed for thread
safety.  We keep other operations on MTA (background) threads, for performance.

This also removes a lot of unused functionality.  AudioSession hasn't been
needed outside of the parent process since audio remoting landed.

Differential Revision: https://phabricator.services.mozilla.com/D251773
2025-06-03 22:30:40 +00:00
Serban Stanca 90d9be235e Revert "Bug 1551856: Move AudioSession to LayoutStatics r=mccr8,win-reviewers,gstoll" for causing gtests assertion failures in AudioSession.cpp.
This reverts commit ece2ce14ae.
2025-06-03 03:39:35 +00:00
David P ece2ce14ae Bug 1551856: Move AudioSession to LayoutStatics r=mccr8,win-reviewers,gstoll
This allows us to shut down the IAudioSessionManager after Cubeb has stopped,
so there shouldn't be STA apartment deadlock issues with it.
IAudioSessionManager's shutdown always requires the STA.  This patch eliminates
MTA threads involvement at shutdown, which was previously needed for thread
safety.  We keep other operations on MTA (background) threads, for performance.

This also removes a lot of unused functionality.  AudioSession hasn't been
needed outside of the parent process since audio remoting landed.

Differential Revision: https://phabricator.services.mozilla.com/D251773
2025-06-03 00:52:06 +00:00
Yannis Juglaret 0695166666 Bug 1950905 - Assert that win32k is available in native event code. r=bobowen
Native event processing requires the creation of an event window,
which isn't possible under win32k lockdown, resulting in a MOZ_CRASH.
This change adds an assertion about the state of win32k lockdown to
differentiate crashes that would occur because of win32k lockdown from
crashes that would occur for other reasons. This only affects the
GPU process (through nsAppShell::PrecacheEventWindow) because, since
bug 1950112, nsAppShell::Init now avoids native event processing if
win32k is unavailable.

Differential Revision: https://phabricator.services.mozilla.com/D239987
2025-02-28 09:17:35 +00:00
Bob Owen b9dff08c48 Bug 1950112: Use win32k lockdown and ACG for GMP process for non-widevine CDMs. r=yjuglaret,win-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D239356
2025-02-27 15:30:02 +00:00
Ray Kraesig 3d638889bf Bug 1945257 - [2/7] Remove ProcessNative*Message() as dead code r=masayuki,win-reviewers,gstoll
Remove the MouseScrollHandler::ProcessNative{MouseWheel,Scroll}Message()
functions as dead code.

Similarly, remove the now-unused mIsWaitingInternalMessage flag, its
getter, and all associated conditionals.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D236592
2025-02-19 18:32:13 +00:00
Butkovits Atila c89afbb999 Backed out 7 changesets (bug 1945257) for causing failures at test_mouse_scroll.xhtml. CLOSED TREE
Backed out changeset 52108bc91d78 (bug 1945257)
Backed out changeset 78d8555e2920 (bug 1945257)
Backed out changeset e5bb427aea9d (bug 1945257)
Backed out changeset 3fe71d666e05 (bug 1945257)
Backed out changeset c8de5bb2daf1 (bug 1945257)
Backed out changeset 9337cb798f25 (bug 1945257)
Backed out changeset a5d3925c71b1 (bug 1945257)
2025-02-17 00:49:48 +02:00
Ray Kraesig d92aa9295e Bug 1945257 - [2/7] Remove ProcessNative*Message() as dead code r=masayuki,win-reviewers,gstoll
Remove the MouseScrollHandler::ProcessNative{MouseWheel,Scroll}Message()
functions as dead code.

Similarly, remove the now-unused mIsWaitingInternalMessage flag, its
getter, and all associated conditionals.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D236592
2025-02-16 20:53:52 +00:00
Stanca Serban 6419b96716 Backed out 7 changesets (bug 1945257) for causing mochitests failures in test_mouse_scroll.xhtml. CLOSED TREE
Backed out changeset 6ae8f390be84 (bug 1945257)
Backed out changeset 2d084241efe2 (bug 1945257)
Backed out changeset 3fd5a363ffcf (bug 1945257)
Backed out changeset f4e07c41993e (bug 1945257)
Backed out changeset 535dad00024c (bug 1945257)
Backed out changeset 5331173141da (bug 1945257)
Backed out changeset 847d20d64c1e (bug 1945257)
2025-02-12 23:20:25 +02:00
Ray Kraesig cfb6913eb5 Bug 1945257 - [2/7] Remove ProcessNative*Message() as dead code r=masayuki,win-reviewers,gstoll
Remove the MouseScrollHandler::ProcessNative{MouseWheel,Scroll}Message()
functions as dead code.

Similarly, remove the now-unused mIsWaitingInternalMessage flag, its
getter, and all associated conditionals.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D236592
2025-02-12 16:29:41 +00:00
Yannis Juglaret 7922fb4eec Bug 1925925 - Create nsAppShell event window before lowering the sandbox in the GPU process. r=bobowen,win-reviewers,rkraesig
This patch ensures that we call CreateWindow before lowering the
GPU sandbox, hoping that this will prevent ERROR_ACCESS_DENIED during
the call to CreateWindow.

Differential Revision: https://phabricator.services.mozilla.com/D226282
2024-10-22 12:07:12 +00:00
Yannis Juglaret a81755da89 Bug 1897479 - Abstract away single-step data collection for reusability. r=rkraesig,win-reviewers
This patch makes the single-step data collection code that we
implemented for bug 1571516 reusable, while preserving its behavior.
No functional changes, except for a slight reordering of the
error-result enum.

We define a generic CollectSingleStepData function that embeds the
magic for starting to trigger single step exceptions and for acting upon
them.

We define a more specialized CollectModuleSingleStepData function which
can be reused if the purpose of single step data collection is to
monitor what paths are taken within a specific module. It stores the
collected data in stack, so that it can be accessed from crash reports.

This code is considered unstable and thus only available in Nightly and
early Beta and only used on paths that are known to crash already.

Differential Revision: https://phabricator.services.mozilla.com/D211195
2024-06-03 12:24:41 +00:00
serge-sans-paille 2507d2f681 Bug 1869497 - Introduce MOZ_NAKED to centralize all attributes we expect from naked r=glandium,win-reviewers,mhowell
In the fx codebase, we tend to use __attribute__((naked)) for plain
assembly functions with a C interface. Instrumenting these functions can
mess up this assembly, so we conservatively also want to prevent
instrumentation.

Differential Revision: https://phabricator.services.mozilla.com/D196154
2023-12-15 09:26:48 +00:00
Cristian Tuns 5693a730d3 Backed out 2 changesets (bug 1865795) for causing spidermonkeys bustages with WinHeaderOnlyUtils.h CLOSED TREE
Backed out changeset d7e12200a4a0 (bug 1865795)
Backed out changeset 9efc72d1ff06 (bug 1865795)
2023-12-06 13:16:53 -05:00
Yannis Juglaret 8d2c3a1caf Bug 1865795 - Abstract away single-step data collection for reusability. r=rkraesig,win-reviewers
This patch makes the single-step data collection code that we
implemented for bug 1571516 reusable, while preserving its behavior.

We define a generic CollectSingleStepData function that embeds the
magic for starting to trigger single step exceptions and for acting upon
them.

We define a more specialized CollectModuleSingleStepData function which
can be reused if the purpose of single step data collection is to
monitor what paths are taken within a specific module. It stores the
collected data in stack, so that it can be accessed from crash reports.

This code is considered unstable and thus only available in Nightly and
early Beta and only used on paths that are known to crash already.

Differential Revision: https://phabricator.services.mozilla.com/D194203
2023-12-06 16:53:40 +00:00
Yannis Juglaret 29675453c5 Bug 1571516 - Additional attempt at collecting debug information for CreateWindowW failures. r=win-reviewers,rkraesig
This patch runs RegisterClassW and CreateWindowW a second time when they
fail, so that we can trace their execution and collect single-step data.
We collect RIP values as we step through user32 code. We also collect
changes in the error state while in user32. We store the collected data
in the stack so that it appears in the crash dumps.

Because this patch only affects behavior after a first failure (which
would normally lead to an immediate crash), it does not alter behavior
for non-crashing users.

Differential Revision: https://phabricator.services.mozilla.com/D189240
2023-10-10 14:41:41 +00:00
Ray Kraesig a627fa29e5 Bug 1571516 - log additional data to stack (redux) r=gsvelto,win-reviewers,mhowell
Improve logging around InitHiddenWindow():

- Normalize WinErrorState.

- Simplify access to the OS-cached last-NTSTATUS value.

- Store and clear the last error-state more frequently.

- When ::CreateWindowW() fails, keep enough information to determine
  whether a call to ::RegisterClassW() was attempted.

- To rule out user atom table exhaustion, check the capacity and
  availability of the user atom table after a call that might have
  created a user atom fails.

- To rule out early return from our WndProc, when
  ::RegisterWindowMessageW() fails, leave the extant value of
  sAppShellGeckoMsgId in place.

Differential Revision: https://phabricator.services.mozilla.com/D188307
2023-09-15 19:12:29 +00:00
Ray Kraesig b55d9e5ef0 Bug 1571516 - [2/2] store diagnostic data within stack frame r=gsvelto
Per https://bugzilla.mozilla.org/show_bug.cgi?id=1571516#c24, we don't
currently store diagnostic data like the value of `::GetLastError()` in
stack dumps. However, we do store the current stack, and that's enough
to be usable.

Store some additional (critical?) diagnostic information in local
variables on the stack... and disable optimizations for that function,
to ensure that those variables actually exist in the stack-dump.

Arguably, no functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D186988
2023-08-30 22:34:44 +00:00
Ray Kraesig b190acd9ed Bug 1571516 - [1/2] preparatory reorganization r=gsvelto
Pull the failing section of code out into its own function, for the sake
of clarity of later diffs.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D186987
2023-08-30 22:34:43 +00:00
Butkovits Atila bd8dfd19c6 Backed out 2 changesets (bug 1571516) for causing bustages at nsAppShell. CLOSED TREE
Backed out changeset d706cd5fccfe (bug 1571516)
Backed out changeset 0664ee61f82f (bug 1571516)
2023-08-30 23:04:10 +03:00
Ray Kraesig 465a8699da Bug 1571516 - [2/2] store diagnostic data within stack frame r=gsvelto
Per https://bugzilla.mozilla.org/show_bug.cgi?id=1571516#c24, we don't
currently store diagnostic data like the value of `::GetLastError()` in
stack dumps. However, we do store the current stack, and that's enough
to be usable.

Store some additional (critical?) diagnostic information in local
variables on the stack... and disable optimizations for that function,
to ensure that those variables actually exist in the stack-dump.

Arguably, no functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D186988
2023-08-30 17:26:32 +00:00
Ray Kraesig b4972b794f Bug 1571516 - [1/2] preparatory reorganization r=gsvelto
Pull the failing section of code out into its own function, for the sake
of clarity of later diffs.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D186987
2023-08-30 17:26:32 +00:00
Masatoshi Kimura a3e419385e Bug 1844908 - Remove pre-Win10-specific codepath from widget/. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D184307
2023-07-26 08:52:54 +00:00
Natalia Csoregi 42e803a2dd Backed out 19 changesets (bug 1844908) for causing win bustage on AvailableMemoryTracker.cpp. CLOSED TREE
Backed out changeset 44c66f2233cf (bug 1844908)
Backed out changeset a8010ff534bf (bug 1844908)
Backed out changeset 225dc3aeb220 (bug 1844908)
Backed out changeset a1414db64e33 (bug 1844908)
Backed out changeset 7f1e0a527839 (bug 1844908)
Backed out changeset 6dc7646d1ffa (bug 1844908)
Backed out changeset 8d715131510f (bug 1844908)
Backed out changeset 4b6fe8a4e7db (bug 1844908)
Backed out changeset 2b419fabf1e8 (bug 1844908)
Backed out changeset af84e701d616 (bug 1844908)
Backed out changeset 2fa203969ec5 (bug 1844908)
Backed out changeset 2b3d2df94db3 (bug 1844908)
Backed out changeset 7eca452f5fd7 (bug 1844908)
Backed out changeset 3d961cf25afe (bug 1844908)
Backed out changeset 3c59143f8dd7 (bug 1844908)
Backed out changeset ab50c6c5425a (bug 1844908)
Backed out changeset b2c5636df673 (bug 1844908)
Backed out changeset e9a0f1c6760c (bug 1844908)
Backed out changeset 945ccbedde0b (bug 1844908)
2023-07-25 19:55:35 +03:00
Masatoshi Kimura 4182954d50 Bug 1844908 - Remove pre-Win10-specific codepath from widget/. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D184307
2023-07-25 14:41:05 +00:00
James Teh f027ac1541 Bug 1838123: Update UI Automation client detection to work with modern versions of Windows. r=nlapre,handyman
The window message we previously hooked no longer gets sent and the associated shared memory no longer seems to be created either.
Also, we don't seem to be notified about the load of UIAutomationCore.dll until after it has already instantiated a11y, which is obviously too late for us to hook anything.
Instead, we block UIA instantiation via LazyInstantiator, just as we do for MSAA/IA2:

1. Refactor CompatibilityUIA so that rather than being called by a hook, it simply allows the caller to query the process ids of any UIA clients.
2. CompatibilityUIA now searches handles in our process for named pipes created by UIA for communication with the remote process and then uses GetNamedPipeServerProcessId to get the process id on the other end of each pipe.
3. Refactor LazyInstantiator so that it first tries to get the MSAA/IA2 client process id, then calls CompatibilityUIA to get any UIA client process ids.
4. LazyInstantiator now handles setting the instantiator and blocking of clients for UIA as well as MSAA/IA2 using the same code.
5. Because UIA client detection can be expensive if clients repeatedly query us, cache the result. Reset that cache only when one of our windows comes to the foreground.

Differential Revision: https://phabricator.services.mozilla.com/D181958
2023-07-13 05:25:20 +00:00
Iulian Moraru 31079e4e24 Backed out changeset 0724fde82b2f (bug 1838123) for causing build bustages. CLOSED TREE 2023-07-13 07:35:44 +03:00
James Teh 24665a2abc Bug 1838123: Update UI Automation client detection to work with modern versions of Windows. r=nlapre,handyman
The window message we previously hooked no longer gets sent and the associated shared memory no longer seems to be created either.
Also, we don't seem to be notified about the load of UIAutomationCore.dll until after it has already instantiated a11y, which is obviously too late for us to hook anything.
Instead, we block UIA instantiation via LazyInstantiator, just as we do for MSAA/IA2:

1. Refactor CompatibilityUIA so that rather than being called by a hook, it simply allows the caller to query the process ids of any UIA clients.
2. CompatibilityUIA now searches handles in our process for named pipes created by UIA for communication with the remote process and then uses GetNamedPipeServerProcessId to get the process id on the other end of each pipe.
3. Refactor LazyInstantiator so that it first tries to get the MSAA/IA2 client process id, then calls CompatibilityUIA to get any UIA client process ids.
4. LazyInstantiator now handles setting the instantiator and blocking of clients for UIA as well as MSAA/IA2 using the same code.
5. Because UIA client detection can be expensive if clients repeatedly query us, cache the result. Reset that cache only when one of our windows comes to the foreground.

Differential Revision: https://phabricator.services.mozilla.com/D181958
2023-07-13 03:57:30 +00:00
David Parks f396f754b1 Bug 1841871: Add native event profiling and logging to Windows AppShell r=gstoll
Differential Revision: https://phabricator.services.mozilla.com/D182819
2023-07-06 19:57:40 +00:00
Stanca Serban d527f6a464 Backed out 2 changesets (bug 1841871) for causing bp-nu bustages in nsWindowDbg.cpp. CLOSED TREE
Backed out changeset 2ea8f3575620 (bug 1841871)
Backed out changeset faafc044fa2b (bug 1841871)
2023-07-06 02:06:52 +03:00
David Parks ef0559468e Bug 1841871: Add native event profiling and logging to Windows AppShell r=gstoll
Differential Revision: https://phabricator.services.mozilla.com/D182819
2023-07-05 21:59:14 +00:00
serge-sans-paille 71d5bc785e Bug 1825324 - Make widget/* buildable outside of a unified build environment r=andi,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D173969
2023-04-01 08:31:12 +00:00
Cristian Tuns 29ebb2f54e Backed out 12 changesets (bug 1825325, bug 1825336, bug 1825333, bug 1825332, bug 1825324, bug 1824557, bug 1825328, bug 1825335, bug 1825330, bug 1825329, bug 1825327, bug 1825331) for causing build bustages in nsClipboard.cpp CLOSED TREE
Backed out changeset 9de3ed24d3a0 (bug 1825336)
Backed out changeset aef787728f19 (bug 1825335)
Backed out changeset a04c341244c1 (bug 1825333)
Backed out changeset e3ad15f762ba (bug 1825332)
Backed out changeset eed23da92a27 (bug 1825331)
Backed out changeset 8213bb54376e (bug 1825330)
Backed out changeset 747ec5ac4994 (bug 1825329)
Backed out changeset e91ff431f92d (bug 1825328)
Backed out changeset 59c18d13768b (bug 1825327)
Backed out changeset 538096d99e49 (bug 1825325)
Backed out changeset c76eb9d9b095 (bug 1825324)
Backed out changeset 8b81410eb686 (bug 1824557)
2023-03-31 12:58:53 -04:00
serge-sans-paille 1bf9d22652 Bug 1825324 - Make widget/* buildable outside of a unified build environment r=andi,geckoview-reviewers,m_kato
Depends on D173637

Differential Revision: https://phabricator.services.mozilla.com/D173969
2023-03-31 13:29:44 +00:00
Mathew Hodson f87e55defb Bug 1783087 - Fix build with --disable-backgroundtasks. r=nalexander DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D153690
2022-08-08 10:40:29 +00:00
David Parks 316f497e45 Bug 1755700: Use StartAudioSession and StopAudioSession symmetrically r=cmartin
Moves StopAudioSession earlier -- to nsAppShell::Run -- where we call StartAudioSession.

Differential Revision: https://phabricator.services.mozilla.com/D152299
2022-07-29 19:32:14 +00:00
Sean Burke 9471bef671 Bug 1343826 - Return updated timezone on system timezone change. r=smaug,mstange,stransky,handyman
Differential Revision: https://phabricator.services.mozilla.com/D146725
2022-06-14 19:41:30 +00:00
Mike Hommey 45b9f403ab Bug 1766561 - Use %lu for Windows Error types (DWORD). r=rkraesig,xpcom-reviewers,application-update-reviewers,mhowell,bobowen,necko-reviewers,keeler,media-playback-reviewers,bytesized,barret,alwu,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144914
2022-05-03 20:49:07 +00:00
Shazib Summar eacc52a34a Bug 1617283 - Shifted AudioSession to MTA and removed COM violations r=handyman
Cleans up the interface to AudioSession and brings in line with COM best practices.  Uses background threads that are implicitly MTA and asserts proper thread behavior.  This also removes AudioSession's Co[Un]Initialize static analysis violations.

Differential Revision: https://phabricator.services.mozilla.com/D140741
2022-04-07 18:39:49 +00:00
Nick Alexander f67aebbc21 Bug 1753603 - Don't {Start,Stop}AudioSession in background tasks. r=mossop
The presenting issue is that each background task's audio session is
user-visible via various Windows UIs that display "volume controls" or
"volume mixers"; this avoids that.

Differential Revision: https://phabricator.services.mozilla.com/D141101
2022-03-16 17:29:37 +00:00
Narcis Beleuzu 5d0bbfc7b8 Backed out changeset 6fd4b72c9a6c (bug 1617283) for dt failure on browser_dbg-backgroundtask-debugging.js . CLOSED TREE 2022-03-16 02:26:38 +02:00
Shazib Summar 38ef159720 Bug 1617283 - Shifted AudioSession to MTA and removed COM violations r=handyman
Pointer to AudioSession object is made std::atomic to resolve crashes (bug 1755700) by atomically modifying/reading the pointer as an effort to make sure any update to the pointer is seen across other threads immediately while not using locks to maintain such concurrency and avoiding dataraces.

This patch is built upon the work done in D136377.

Differential Revision: https://phabricator.services.mozilla.com/D140741
2022-03-15 19:48:43 +00:00
Narcis Beleuzu 878597bb4a Backed out changeset e1b946a41694 (bug 1617283) for audio related crashes and hangs (bug 1755700, bug 1755717). a=backout 2022-02-16 18:14:02 +02:00
Shazib Summar 56d1e09352 Bug 1617283 - Removed COM violations and shifted AudioSession to MTA r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D136377
2022-02-15 22:28:41 +00:00
Butkovits Atila bd93ffbe3f Backed out changeset 14ef7c10fef4 (bug 1617283) for causing bustages complaining about Unified_cpp_widget_windows0.obj. CLOSED TREE 2022-02-07 00:24:45 +02:00