OSDN Git Service

jniRegisterNativeMethods should abort on failure
authorAndy McFadden <fadden@android.com>
Fri, 7 Jan 2011 21:34:47 +0000 (13:34 -0800)
committerAndy McFadden <fadden@android.com>
Fri, 7 Jan 2011 21:34:47 +0000 (13:34 -0800)
commit5e261cd107a923ffc4d4329aa9bd19da220981c8
tree3b094c232a1fee56b33ffc512ff5db5b6361dab2
parent02558df0173befced077255dafddcc45afa4a009
jniRegisterNativeMethods should abort on failure

The jniRegisterNativeMethods function currently behaves like the
RegisterNatives function that it wraps, returning 0 on success and
nonzero on failure.  However, this is an internal-only function used
by bits of infrastructure that should never fail to initialize.  By
aborting sooner we make the failure impossible to ignore.

This doesn't appear to break anything.

Bug 3323089

Change-Id: I48d1b02d90616d4c9ee01eb0e46cb61752727c5b
libnativehelper/JNIHelp.c