Update expectations in SetVerifierDeps/SetStackSample.

SetStackSample might update an existing sample. So instead
check that SetStackSample is only called in non-AOT mode, and
SetVerifierDeps is only called in AOT mode.

Test: 099-vmdebug
Change-Id: I80dc3d61da651fb311364418802b0bb7e1ce9351
diff --git a/runtime/thread.h b/runtime/thread.h
index 3f13db1..97093a6 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -39,6 +39,7 @@
 #include "jvalue.h"
 #include "object_callbacks.h"
 #include "offsets.h"
+#include "runtime.h"
 #include "runtime_stats.h"
 #include "stack.h"
 #include "thread_state.h"
@@ -948,15 +949,17 @@
   }
 
   std::vector<ArtMethod*>* GetStackTraceSample() const {
+    DCHECK(!Runtime::Current()->IsAotCompiler());
     return tlsPtr_.deps_or_stack_trace_sample.stack_trace_sample;
   }
 
   void SetStackTraceSample(std::vector<ArtMethod*>* sample) {
-    DCHECK(sample == nullptr || tlsPtr_.deps_or_stack_trace_sample.verifier_deps == nullptr);
+    DCHECK(!Runtime::Current()->IsAotCompiler());
     tlsPtr_.deps_or_stack_trace_sample.stack_trace_sample = sample;
   }
 
   verifier::VerifierDeps* GetVerifierDeps() const {
+    DCHECK(Runtime::Current()->IsAotCompiler());
     return tlsPtr_.deps_or_stack_trace_sample.verifier_deps;
   }
 
@@ -964,8 +967,8 @@
   // entry in the thread is cleared before destruction of the actual VerifierDeps
   // object, or the thread.
   void SetVerifierDeps(verifier::VerifierDeps* verifier_deps) {
-    DCHECK(verifier_deps == nullptr ||
-           tlsPtr_.deps_or_stack_trace_sample.stack_trace_sample == nullptr);
+    DCHECK(Runtime::Current()->IsAotCompiler());
+    DCHECK(verifier_deps == nullptr || tlsPtr_.deps_or_stack_trace_sample.verifier_deps == nullptr);
     tlsPtr_.deps_or_stack_trace_sample.verifier_deps = verifier_deps;
   }