diff options
author | 2015-08-28 20:53:02 +0000 | |
---|---|---|
committer | 2015-08-28 20:53:02 +0000 | |
commit | ce209462cc1a7ce235e5ac0d0e6db6b402f73441 (patch) | |
tree | 11a5b7771cf4deaae9b0a34cffda6495253fb665 /compiler/optimizing/optimizing_compiler.cc | |
parent | b00ae4a328de9865c0b56ec45035cf2284705583 (diff) | |
parent | ed15000a5099f5e230c8ded5ac75692bae272650 (diff) |
Merge "Fix some HandleScope bugs and add corresponding checks"
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 2a7699105c..1db3063aec 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -540,11 +540,14 @@ CompiledMethod* OptimizingCompiler::CompileOptimized(HGraph* graph, CompilerDriver* compiler_driver, const DexCompilationUnit& dex_compilation_unit, PassObserver* pass_observer) const { - StackHandleScopeCollection handles(Thread::Current()); + ScopedObjectAccess soa(Thread::Current()); + StackHandleScopeCollection handles(soa.Self()); + soa.Self()->TransitionFromRunnableToSuspended(kNative); RunOptimizations(graph, compiler_driver, compilation_stats_.get(), dex_compilation_unit, pass_observer, &handles); if (graph->HasTryCatch()) { + soa.Self()->TransitionFromSuspendedToRunnable(); return nullptr; } @@ -582,6 +585,8 @@ CompiledMethod* OptimizingCompiler::CompileOptimized(HGraph* graph, ArrayRef<const uint8_t>(*codegen->GetAssembler()->cfi().data()), ArrayRef<const LinkerPatch>(linker_patches)); pass_observer->DumpDisassembly(); + + soa.Self()->TransitionFromSuspendedToRunnable(); return compiled_method; } |