This patch uses the Windows.System.Profile.WindowsIntegrityPolicy class to determine whether or not Windows is in S mode. This class is only available beginning with SDK 17763 (newer than what we use right now), so we need to fetch it at runtime with some magic.
This is a completely no-op for Windows versions older than 1810, where the WindowsIntegrityPolicy class is not available.
Differential Revision: https://phabricator.services.mozilla.com/D130397
This is a pointer-sized value, so there's no need to pass it by
value. All of the SpiderMonkey places that pass GCCellPtr are doing
it by value, so this is aligning with that.
In addition, I removed a NoteJSChild() overload that is no longer
used.
Differential Revision: https://phabricator.services.mozilla.com/D131163
This is essentially a short-hand for adding a direct task to the current thread,
possible when a watch manager is already present.
Differential Revision: https://phabricator.services.mozilla.com/D130870
Revert some of the fix for 1722758 so that only the URL ref component is re-encoded for NSURL compatibility. Other URL fields need additional work to be addressed in a follow up.
Update the set of characters re-encoded to be as minimal as possible and include missing characters.
Add tests to ensure encoding works as expected, not just that it is accepted by NSURL.
Differential Revision: https://phabricator.services.mozilla.com/D130445
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.
Differential Revision: https://phabricator.services.mozilla.com/D130009
This replaces the simple boolean ThreadRegistrationData::mIsBeingProfiled and its directly-dependent functions.
profiler_thread_is_being_profiled now takes an extra (currently optional) argument, to check if any of the given ThreadProfilingFeatures is currently live.
This is used to control:
- Periodic sampling of CPU utilization.
- Periodic sampling of stacks.
- Markers.
This patch doesn't change the observed behavior yet (i.e., instead of IsBeingProfiled being true or false, all thread profiling features are either all or nothing), but will be used for finer-grained control in later patches.
Differential Revision: https://phabricator.services.mozilla.com/D130008
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.
Differential Revision: https://phabricator.services.mozilla.com/D130009
This replaces the simple boolean ThreadRegistrationData::mIsBeingProfiled and its directly-dependent functions.
profiler_thread_is_being_profiled now takes an extra (currently optional) argument, to check if any of the given ThreadProfilingFeatures is currently live.
This is used to control:
- Periodic sampling of CPU utilization.
- Periodic sampling of stacks.
- Markers.
This patch doesn't change the observed behavior yet (i.e., instead of IsBeingProfiled being true or false, all thread profiling features are either all or nothing), but will be used for finer-grained control in later patches.
Differential Revision: https://phabricator.services.mozilla.com/D130008
A call to InitCommandLine was added in Bug 1727180 where gArgc and gArgv are
not defined.
The same bug also re-enabled some tests that appeared to pass (but really they
were just silently crashing), this patch fixes that too.
Differential Revision: https://phabricator.services.mozilla.com/D130223
Kingsoft's modules are injected before `IOInterposer` and starts a thread that
calls `NtReadFile`. It conflicts with the main thread where `IOInterposer` hooks
`NtReadFile`.
This patch is a mitigation until we make `IOInterposer` compatible with such
third-party injections (bug 1646804).
Differential Revision: https://phabricator.services.mozilla.com/D129876
We want to be able to have a different behavior for interactions with an entry
in the Windows system tray - specifically, we want to be able to open a window
on left click, and show a menu on right click. This patch allows us to control
this with a "contextmenu" attribute on the menu passed in to `AddItem`, and
receive a "systemstatusbarclick" event in the case of a left click.
Regarding tests, I don't know that we have a good way of testing this?
Suggestions are of course welcome here.
Differential Revision: https://phabricator.services.mozilla.com/D129413
mozalloc_abort() implies OOM. NS_DebugBreak() is used for other debug breaks and aborts. Calling MOZ_CRASH_UNSAFE(aMsg) instead of MOZ_CRASH() is unlikely to cause new OOM crashes because NS_DebugBreak() already did a lot of work to format aMsg and walk the stack before calling Abort() and MOZ_CRASH_UNSAFE(aMsg).
Differential Revision: https://phabricator.services.mozilla.com/D129116