Title: [263047] trunk/Source/WTF
- Revision
- 263047
- Author
- keith_mil...@apple.com
- Date
- 2020-06-15 11:50:33 -0700 (Mon, 15 Jun 2020)
Log Message
Unreviewed, build fix for build without mach exceptions.
* wtf/threads/Signals.cpp:
(WTF::SignalHandlers::add):
(WTF::addSignalHandler):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (263046 => 263047)
--- trunk/Source/WTF/ChangeLog 2020-06-15 18:35:28 UTC (rev 263046)
+++ trunk/Source/WTF/ChangeLog 2020-06-15 18:50:33 UTC (rev 263047)
@@ -1,5 +1,13 @@
2020-06-15 Keith Miller <keith_mil...@apple.com>
+ Unreviewed, build fix for build without mach exceptions.
+
+ * wtf/threads/Signals.cpp:
+ (WTF::SignalHandlers::add):
+ (WTF::addSignalHandler):
+
+2020-06-15 Keith Miller <keith_mil...@apple.com>
+
Signal handlers should have a two phase installation.
https://bugs.webkit.org/show_bug.cgi?id=213160
Modified: trunk/Source/WTF/wtf/threads/Signals.cpp (263046 => 263047)
--- trunk/Source/WTF/wtf/threads/Signals.cpp 2020-06-15 18:35:28 UTC (rev 263046)
+++ trunk/Source/WTF/wtf/threads/Signals.cpp 2020-06-15 18:50:33 UTC (rev 263047)
@@ -53,6 +53,10 @@
namespace WTF {
+#if HAVE(MACH_EXCEPTIONS)
+static exception_mask_t toMachMask(Signal);
+#endif
+
void SignalHandlers::add(Signal signal, SignalHandler&& handler)
{
Config::AssertNotFrozenScope assertScope;
@@ -61,6 +65,9 @@
size_t signalIndex = static_cast<size_t>(signal);
size_t nextFree = numberOfHandlers[signalIndex];
+#if HAVE(MACH_EXCEPTIONS)
+ addedExceptions |= toMachMask(signal);
+#endif
RELEASE_ASSERT(nextFree < maxNumberOfHandlers);
SignalHandlerMemory* memory = &handlers[signalIndex][nextFree];
new (memory) SignalHandler(WTFMove(handler));
@@ -291,8 +298,6 @@
static std::once_flag initializeOnceFlags[static_cast<size_t>(Signal::NumberOfSignals)];
std::call_once(initializeOnceFlags[static_cast<size_t>(signal)], [&] {
Config::AssertNotFrozenScope assertScope;
-
- handlers.addedExceptions |= toMachMask(signal);
if (!handlers.useMach) {
struct sigaction action;
action.sa_sigaction = jscSignalHandler;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes