[WTF] Use ThreadGroup to bookkeep active threads for Mach exception
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jul 2017 18:32:13 +0000 (18:32 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jul 2017 18:32:13 +0000 (18:32 +0000)
commitf872777d888c5dbe150222678a976f0e9432ea57
tree2056a30a4cd95d59f360aa72c70f2fe191bd29cf
parent233f26ae67e6e2685e7bb5b3a352797b03ea916d
[WTF] Use ThreadGroup to bookkeep active threads for Mach exception
https://bugs.webkit.org/show_bug.cgi?id=174678

Reviewed by Mark Lam.

Source/JavaScriptCore:

Use Thread& instead.

* runtime/JSLock.cpp:
(JSC::JSLock::didAcquireLock):

Source/WTF:

We can use ThreadGroup to bookkeep active threads for Mach exceptions.
When the thread dies, it is automatically removed from the thread groups.
So we do not need to call unregisterThreadForMachExceptionHandling.

* wtf/ThreadGroup.cpp:
(WTF::ThreadGroup::~ThreadGroup):
(WTF::ThreadGroup::add):
* wtf/ThreadGroup.h:
* wtf/ThreadHolder.cpp:
(WTF::ThreadHolder::~ThreadHolder):
* wtf/Threading.cpp:
(WTF::Thread::addToThreadGroup):
(WTF::Thread::removeFromThreadGroup):
* wtf/Threading.h:
* wtf/threads/Signals.cpp:
(WTF::setExceptionPorts):
(WTF::activeThreads):
(WTF::registerThreadForMachExceptionHandling):
(WTF::installSignalHandler):
(WTF::unregisterThreadForMachExceptionHandling): Deleted.
* wtf/threads/Signals.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@219696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSLock.cpp
Source/WTF/ChangeLog
Source/WTF/wtf/ThreadGroup.cpp
Source/WTF/wtf/ThreadGroup.h
Source/WTF/wtf/ThreadHolder.cpp
Source/WTF/wtf/Threading.cpp
Source/WTF/wtf/Threading.h
Source/WTF/wtf/threads/Signals.cpp
Source/WTF/wtf/threads/Signals.h