hotspot/src/share/vm/runtime/mutex.cpp
changeset 46644 a5813fb66270
parent 41704 14be0ae96c86
child 46767 e2bb2b8ff65a
--- a/hotspot/src/share/vm/runtime/mutex.cpp	Fri Jul 07 23:04:06 2017 +0200
+++ b/hotspot/src/share/vm/runtime/mutex.cpp	Fri Jul 07 23:11:33 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1389,10 +1389,8 @@
     debug_only(if (rank() != Mutex::special) \
                thread->check_for_valid_safepoint_state(false);)
   }
-  if (thread->is_Watcher_thread()) {
-    assert(!WatcherThread::watcher_thread()->has_crash_protection(),
-           "locking not allowed when crash protection is set");
-  }
+  assert(!os::ThreadCrashProtection::is_crash_protected(thread),
+         "locking not allowed when crash protection is set");
 }
 
 void Monitor::check_block_state(Thread *thread) {