OSDN Git Service

Create linker-namespace for the classloader
authorDimitry Ivanov <dimitry@google.com>
Tue, 23 Feb 2016 22:25:50 +0000 (14:25 -0800)
committerDimitry Ivanov <dimitry@google.com>
Thu, 25 Feb 2016 22:57:55 +0000 (14:57 -0800)
commita55c7f15a3c386ec643f21eeb2f4e9fd7b03ba70
treef29a3aa68837f17704a5d82214f01d71496d2061
parentef417514e703c79b5d321fa483d36d479f55f3b3
Create linker-namespace for the classloader

With this change ApplicationLoaders.getClassLoader()
creates linker-namespace for the classloader at the
construction time. Before this change the namespace
was created on first load of a jni library.

With this change we ensure that every classloader
has initialized namespace associated with it.

As an additional advantage we now can avoid storing
namespace-specific fields in the classloaders.

Bug: http://b/27189432
Bug: http://b/22548808
Change-Id: I3b160bd478a55171008682c40b2ebc13bdbd9882
core/java/android/app/ApplicationLoaders.java
core/java/android/app/LoadedApk.java
core/java/android/app/NativeActivity.java
core/jni/Android.mk
core/jni/AndroidRuntime.cpp
core/jni/android_app_ApplicationLoaders.cpp [new file with mode: 0644]
core/jni/android_app_NativeActivity.cpp