Visit targets of proxy methods when visiting thread roots.
The target of a non-static proxy method (`this` object), stored in the
proxy method's stack frame, needs to be visited as GC root. This is
especially important in the case of a moving GC, where the proxy
instance may be moved like any object.
Fix initially provided by Robert Vollmer.
Test: m test-art-host
Test: art/test/testrunner/testrunner.py --gcstress -t 1939-proxy-frames
Test: art/test/testrunner/testrunner.py --gcstress -t 1914-get-local-instance
Bug: 70216372
Bug: 67679263
Change-Id: Iea27a8eba51ccd9c9055efaf6b263892830170b5
diff --git a/runtime/art_method.h b/runtime/art_method.h
index cec2ec4..21ee8f1 100644
--- a/runtime/art_method.h
+++ b/runtime/art_method.h
@@ -551,7 +551,7 @@
// Is this a CalleSaveMethod or ResolutionMethod and therefore doesn't adhere to normal
// conventions for a method of managed code. Returns false for Proxy methods.
ALWAYS_INLINE bool IsRuntimeMethod() {
- return dex_method_index_ == kRuntimeMethodDexMethodIndex;;
+ return dex_method_index_ == kRuntimeMethodDexMethodIndex;
}
// Is this a hand crafted method used for something like describing callee saves?