Various things.
This patch:
1. adds good-enough implementations for a couple of Class native methods we
need.
2. removes a fixed TODO from image_test.
3. adds missing null checks to the Thread native methods, and forwards
Thread.nativeCreate to Thread::Create.
4. stops jni_compiler from overwriting already-registered native methods
with the dynamic lookup stub.
5. adds workarounds to Thread::CreatePeer so we can cope better without
code, attempts to initialize thread groups correctly, dumps thread state
from the managed peer (where one exists), and implements Thread::DumpStack
for debugging (and SIGQUIT dumps).
Change-Id: I3281226dd22ec852dca5165748fc75a254904ac0
diff --git a/src/object.h b/src/object.h
index 94adf60..70a9b33 100644
--- a/src/object.h
+++ b/src/object.h
@@ -903,6 +903,10 @@
return_pc_offset_in_bytes, false);
}
+ bool IsRegistered() {
+ return GetFieldPtr<const void*>(OFFSET_OF_OBJECT_MEMBER(Method, native_method_), false) != NULL;
+ }
+
void RegisterNative(const void* native_method) {
CHECK(IsNative());
CHECK(native_method != NULL);