Various runtime/JNI related fixes.

NewObject returns NULL if exception is thrown in constructor.
Allocate the peer then call constructor to ensure peer_ field is
initialized.
Change thread state for AddFinalizer and pass current thread through for
ease.

Change-Id: Ib578b6d44b08aef10fde5d8bc27cc6a2acbf6fae
7 files changed
tree: 6f1e9e59c2899488ab018d5cd8279641041f7634
  1. Android.mk
  2. build/
  3. oat_process/
  4. oat_runtime/
  5. src/
  6. test/
  7. tools/