Fix an assert during jdwp debugging.
When debugger attaches, we patch entry points of methods in framework code.
During that process, it's possible that some method's declaring class isn't
resolved yet. We need to relax one assert for that case.
Bug: 28630805
Change-Id: I59fd488ad75417a64b52321677ffcac6ccdc5ce1
diff --git a/runtime/instrumentation.h b/runtime/instrumentation.h
index a4c3d41..ce6ead4 100644
--- a/runtime/instrumentation.h
+++ b/runtime/instrumentation.h
@@ -227,6 +227,10 @@
void UpdateMethodsCode(ArtMethod* method, const void* quick_code)
SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(!deoptimized_methods_lock_);
+ // Update the code of a method respecting any installed stubs from debugger.
+ void UpdateMethodsCodeFromDebugger(ArtMethod* method, const void* quick_code)
+ SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(!deoptimized_methods_lock_);
+
// Get the quick code for the given method. More efficient than asking the class linker as it
// will short-cut to GetCode if instrumentation and static method resolution stubs aren't
// installed.
@@ -493,6 +497,9 @@
SHARED_REQUIRES(Locks::mutator_lock_, deoptimized_methods_lock_);
bool IsDeoptimizedMethodsEmpty() const
SHARED_REQUIRES(Locks::mutator_lock_, deoptimized_methods_lock_);
+ void UpdateMethodsCodeImpl(ArtMethod* method, const void* quick_code)
+ SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(!deoptimized_methods_lock_);
+
// Have we hijacked ArtMethod::code_ so that it calls instrumentation/interpreter code?
bool instrumentation_stubs_installed_;