summaryrefslogtreecommitdiffstats
path: root/runtime/runtime.h
diff options
context:
space:
mode:
authorCalin Juravle <calin@google.com>2014-10-22 21:02:23 +0100
committerCalin Juravle <calin@google.com>2014-10-23 11:57:10 +0100
commit07d83c7a25022064ac0a8dac4fe2a7a38681fa4b (patch)
treea3b34ea26da0fa4751668441d6ae6698bce47680 /runtime/runtime.h
parent46bf5e0759e80bbe69130d6731a95fd07e10507c (diff)
downloadart-07d83c7a25022064ac0a8dac4fe2a7a38681fa4b.tar.gz
art-07d83c7a25022064ac0a8dac4fe2a7a38681fa4b.tar.bz2
art-07d83c7a25022064ac0a8dac4fe2a7a38681fa4b.zip
[native bridge] Make sure we always unload the native bridge
libnativebridge may allocate some resources during loading and intialization and de-allocate them when unloading. This makes sure that we don't leak anything. Bug: 18097480 Change-Id: I901f2d3c2ab1efb2875388f99e8c5c111ce82d5a
Diffstat (limited to 'runtime/runtime.h')
-rw-r--r--runtime/runtime.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h
index f3bea17d6d..bfa7d720cb 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -635,14 +635,16 @@ class Runtime {
bool implicit_so_checks_; // StackOverflow checks are implicit.
bool implicit_suspend_checks_; // Thread suspension checks are implicit.
- // The filename to the native bridge library. If this is not empty the native bridge will be
- // initialized and loaded from the given file (initialized and available). An empty value means
- // that there's no native bridge (initialized but not available).
+ // Whether or not a native bridge has been loaded.
//
// The native bridge allows running native code compiled for a foreign ISA. The way it works is,
// if standard dlopen fails to load native library associated with native activity, it calls to
// the native bridge to load it and then gets the trampoline for the entry to native activity.
- std::string native_bridge_library_filename_;
+ //
+ // The option 'native_bridge_library_filename' specifies the name of the native bridge.
+ // When non-empty the native bridge will be loaded from the given file. An empty value means
+ // that there's no native bridge.
+ bool is_native_bridge_loaded_;
DISALLOW_COPY_AND_ASSIGN(Runtime);
};