summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dalvik_system_DexFile.cc2
-rw-r--r--src/heap.cc5
-rw-r--r--src/runtime.cc2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/dalvik_system_DexFile.cc b/src/dalvik_system_DexFile.cc
index de3e6d6c10..a14f1241ef 100644
--- a/src/dalvik_system_DexFile.cc
+++ b/src/dalvik_system_DexFile.cc
@@ -144,7 +144,7 @@ static jint DexFile_openDexFile(JNIEnv* env, jclass, jstring javaSourceName, jst
static const DexFile* toDexFile(JNIEnv* env, int dex_file_address) {
const DexFile* dex_file = reinterpret_cast<const DexFile*>(static_cast<uintptr_t>(dex_file_address));
- if ((dex_file == NULL)) {
+ if (dex_file == NULL) {
jniThrowNullPointerException(env, "dex_file == null");
}
return dex_file;
diff --git a/src/heap.cc b/src/heap.cc
index fe5ca7a90d..1efc956452 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -146,7 +146,10 @@ void Heap::Init(size_t initial_size, size_t maximum_size, size_t growth_size,
}
void Heap::Destroy() {
- ScopedHeapLock lock;
+ // We can't take the heap lock here because there might be a daemon thread suspended with the
+ // heap lock held. We know though that no non-daemon threads are executing, and we know that
+ // all daemon threads are suspended, and we also know that the threads list have been deleted, so
+ // those threads can't resume. We're the only running thread, and we can do whatever we like...
STLDeleteElements(&spaces_);
if (mark_bitmap_ != NULL) {
delete mark_bitmap_;
diff --git a/src/runtime.cc b/src/runtime.cc
index 4d95b4b01d..e9d5677aab 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -386,6 +386,8 @@ Runtime::ParsedOptions* Runtime::ParsedOptions::Create(const Options& options, b
parsed->hook_abort_ = reinterpret_cast<void(*)()>(options[i].second);
} else if (option == "host-prefix") {
parsed->host_prefix_ = reinterpret_cast<const char*>(options[i].second);
+ } else if (option == "-Xgenregmap" || option == "-Xgc:precise") {
+ // We silently ignore these for backwards compatibility.
} else {
if (!ignore_unrecognized) {
// TODO: print usage via vfprintf