Replaced .dot generation lock with ScopedObjectAccess.

Change-Id: I70013a488a82d78a2cdfcbb77d3c582d6b97aedc
diff --git a/compiler/sea_ir/debug/dot_gen.cc b/compiler/sea_ir/debug/dot_gen.cc
index 9e071e1..340a20e 100644
--- a/compiler/sea_ir/debug/dot_gen.cc
+++ b/compiler/sea_ir/debug/dot_gen.cc
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include "scoped_thread_state_change.h"
 #include "sea_ir/debug/dot_gen.h"
 
 namespace sea_ir {
@@ -51,6 +52,7 @@
       dot_text_ += art::StringPrintf("vR = %d", def_it->first);
       std::map<int, const Type*>::const_iterator type_it = types_->find(def_it->second->Id());
       if (type_it != types_->end()) {
+        art::ScopedObjectAccess soa(art::Thread::Current());
         dot_text_ += "(" + type_it->second->Dump() + ")";
       } else {
         dot_text_ += "()";