Moved misplaced assert in StompWriteBarrier for safety. (dotnet/coreclr#26407)
authorIvan Diaz Sanchez <52939971+ivdiazsa@users.noreply.github.com>
Wed, 28 Aug 2019 03:21:10 +0000 (20:21 -0700)
committerJan Kotas <jkotas@microsoft.com>
Wed, 28 Aug 2019 03:21:10 +0000 (20:21 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/5b247316ddd7f4beb7cf8bd21bb49b84702f1883

src/coreclr/src/vm/gcenv.ee.cpp

index 7449961..09bfad5 100644 (file)
@@ -802,10 +802,10 @@ void GCToEEInterface::DiagWalkBGCSurvivors(void* gcContext)
 
 void GCToEEInterface::StompWriteBarrier(WriteBarrierParameters* args)
 {
+    assert(args != nullptr);
     int stompWBCompleteActions = SWB_PASS;
     bool is_runtime_suspended = args->is_runtime_suspended;
 
-    assert(args != nullptr);
     switch (args->operation)
     {
     case WriteBarrierOp::StompResize: