8020701: Avoid crashes in WatcherThread

Reviewed-by: acorn, dcubed, dsimms
This commit is contained in:
Rickard Bäckman 2013-07-17 13:48:15 +02:00
parent 71ca890b66
commit 2d77390705
14 changed files with 169 additions and 1 deletions

View file

@ -1226,7 +1226,7 @@ WatcherThread* WatcherThread::_watcher_thread = NULL;
bool WatcherThread::_startable = false;
volatile bool WatcherThread::_should_terminate = false;
WatcherThread::WatcherThread() : Thread() {
WatcherThread::WatcherThread() : Thread(), _crash_protection(NULL) {
assert(watcher_thread() == NULL, "we can only allocate one WatcherThread");
if (os::create_thread(this, os::watcher_thread)) {
_watcher_thread = this;