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. build/
  2. oat_process/
  3. oat_runtime/
  4. src/
  5. test/
  6. tools/
  7. Android.mk