We always have Dwm{Get,Set}WindowAttribute because we fail if we can't
load them.
This in practice means that we release the DC and uncloak the window a
bit later (due to the MakeScopeExits), but I think that's fine.
Differential Revision: https://phabricator.services.mozilla.com/D229267
These only do something on Windows, and after windows 7 they are not
useful at all.
If this has no fallout I plan to simplify the code further in a
follow-up (we can basically make this a boolean attribute again or so).
Differential Revision: https://phabricator.services.mozilla.com/D228528
These only do something on Windows, and after windows 7 they are not
useful at all.
If this has no fallout I plan to simplify the code further in a
follow-up (we can basically make this a boolean attribute again or so).
Differential Revision: https://phabricator.services.mozilla.com/D228528
Unlike the previous patch this does change behavior, but I think it's
fine.
The reason we used the non-lwt toolbar colors for customize mode is to
guarantee full opacity, see bug 1762379 and bug 1765685.
However, we need to do the same on the sidebar, and there we chose a
more theme-friendly way of doing that, which allows this simplification.
So do that instead.
Differential Revision: https://phabricator.services.mozilla.com/D228523
MOZ_RUNINIT => initialized at runtime
MOZ_CONSTINIT => initialized at compile time
MOZ_GLOBINIT => initialized either at runtime or compile time, depending on template parameter, macro parameter etc
This annotation is only understood by our clang-tidy plugin. It has no
effect on regular compilation.
Differential Revision: https://phabricator.services.mozilla.com/D223341
When I wrapped the XRE entry points in the Bootstrap class back in bug
1306327, I didn't think too much about it. Now that I'm looking at the
iOS port, I realize the function doesn't really make much sense, and can
be inlined in its (sole) caller.
Differential Revision: https://phabricator.services.mozilla.com/D227120
In earlier version of working on those interposers, for some
undetermined reason the resolution would fail to find the glibc symbol
when using GET_REAL_SYMBOL() and we had to make use of dlvsym() instead.
After testing again this seems not to hold anymore so we can just make
use of GET_REAL_SYMBOL().
Differential Revision: https://phabricator.services.mozilla.com/D226984
This doesn't take on the task of also drawing the sidebar, as gathering state for that
is a little more complex to do. Purely removing the flicker from the top of the window
(and potential user confusion about why there is a horizontal tab there) seems a
worthwhile improvement.
Differential Revision: https://phabricator.services.mozilla.com/D226822
On 64-bit Windows (x86_64, aarch64), stack walking relies on
RtlLookupFunctionEntry to navigate from one frame to the next. This
function acquires up to two ntdll internal locks when it is called.
The profiler and the background hang monitor both need to walk the
stacks of suspended threads. This can lead to deadlock situations,
which so far we have avoided with stack walk suppressions. We guard some
critical paths to mark them as suppressing stack walk, and we forbid
stack walking when any thread is currently on such path.
While stack walk suppression has helped remove most deadlock situations,
some can remain because it is hard to detect and manually annotate all
the paths that could lead to a deadlock situation. Another drawback is
that stack walk suppression disables stack walking for much larger
portions of code than required. For example, we disable stack walking
for LdrLoadDll, so we cannot collect stacks while we are loading a DLL.
Yet, the lock that could lead to a deadlock situation is only held
during a very small portion of the whole time spent in LdrLoadDll.
This patch addresses these two issues by implementing a finer-grained
strategy to avoid deadlock situations. We acquire the pointers to the
internel ntdll locks through a single-stepped execution of
RtlLookupFunctionEntry. This allows us to try to acquire the locks
non-blockingly so that we can guarantee safe stack walking with no
deadlock.
If we fail to collect pointers to the locks, we fall back to using stack
walk suppressions like before. This way we get the best of both worlds:
if we are confident that the situation is under control, we will use the
new strategy and get better profiler accuracy and no deadlock; in case
of doubt, we can still use the profiler thanks to stack walk
suppressions.
Differential Revision: https://phabricator.services.mozilla.com/D223498
On 64-bit Windows (x86_64, aarch64), stack walking relies on
RtlLookupFunctionEntry to navigate from one frame to the next. This
function acquires up to two ntdll internal locks when it is called.
The profiler and the background hang monitor both need to walk the
stacks of suspended threads. This can lead to deadlock situations,
which so far we have avoided with stack walk suppressions. We guard some
critical paths to mark them as suppressing stack walk, and we forbid
stack walking when any thread is currently on such path.
While stack walk suppression has helped remove most deadlock situations,
some can remain because it is hard to detect and manually annotate all
the paths that could lead to a deadlock situation. Another drawback is
that stack walk suppression disables stack walking for much larger
portions of code than required. For example, we disable stack walking
for LdrLoadDll, so we cannot collect stacks while we are loading a DLL.
Yet, the lock that could lead to a deadlock situation is only held
during a very small portion of the whole time spent in LdrLoadDll.
This patch addresses these two issues by implementing a finer-grained
strategy to avoid deadlock situations. We acquire the pointers to the
internel ntdll locks through a single-stepped execution of
RtlLookupFunctionEntry. This allows us to try to acquire the locks
non-blockingly so that we can guarantee safe stack walking with no
deadlock.
If we fail to collect pointers to the locks, we fall back to using stack
walk suppressions like before. This way we get the best of both worlds:
if we are confident that the situation is under control, we will use the
new strategy and get better profiler accuracy and no deadlock; in case
of doubt, we can still use the profiler thanks to stack walk
suppressions.
Differential Revision: https://phabricator.services.mozilla.com/D223498
This maps better to the code we have in nsWindow, and fixes a couple
bugs which caused maximized skeleton UI-consuming windows to be
mispositioned with the following patches.
Differential Revision: https://phabricator.services.mozilla.com/D225100
This maps better to the code we have in nsWindow, and fixes a couple
bugs which caused maximized skeleton UI-consuming windows to be
mispositioned with the following patches.
Differential Revision: https://phabricator.services.mozilla.com/D225100