src/hotspot/share/gc/shared/collectedHeap.hpp
changeset 49019 68b283918441
parent 49014 407a8495d4b3
child 49045 9b556b613a07
--- a/src/hotspot/share/gc/shared/collectedHeap.hpp	Mon Feb 19 15:07:21 2018 +0100
+++ b/src/hotspot/share/gc/shared/collectedHeap.hpp	Mon Feb 19 15:44:56 2018 +0100
@@ -622,16 +622,12 @@
   GCCause::Cause _previous_cause;
  public:
   GCCauseSetter(CollectedHeap* heap, GCCause::Cause cause) {
-    assert(SafepointSynchronize::is_at_safepoint(),
-           "This method manipulates heap state without locking");
     _heap = heap;
     _previous_cause = _heap->gc_cause();
     _heap->set_gc_cause(cause);
   }
 
   ~GCCauseSetter() {
-    assert(SafepointSynchronize::is_at_safepoint(),
-          "This method manipulates heap state without locking");
     _heap->set_gc_cause(_previous_cause);
   }
 };