diff options
-rw-r--r-- | runtime/native/dalvik_system_ZygoteHooks.cc | 5 | ||||
-rw-r--r-- | runtime/runtime.cc | 3 | ||||
-rw-r--r-- | runtime/runtime.h | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/runtime/native/dalvik_system_ZygoteHooks.cc b/runtime/native/dalvik_system_ZygoteHooks.cc index 2af5324..1008491 100644 --- a/runtime/native/dalvik_system_ZygoteHooks.cc +++ b/runtime/native/dalvik_system_ZygoteHooks.cc @@ -91,9 +91,8 @@ static void EnableDebugFeatures(uint32_t debug_flags) { static jlong ZygoteHooks_nativePreFork(JNIEnv* env, jclass) { Runtime* runtime = Runtime::Current(); CHECK(runtime->IsZygote()) << "runtime instance not started with -Xzygote"; - if (!runtime->PreZygoteFork()) { - LOG(FATAL) << "pre-fork heap failed"; - } + + runtime->PreZygoteFork(); // Grab thread before fork potentially makes Thread::pthread_key_self_ unusable. Thread* self = Thread::Current(); diff --git a/runtime/runtime.cc b/runtime/runtime.cc index 1b3c996..f8634ce 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -272,9 +272,8 @@ void Runtime::Abort() { // notreached } -bool Runtime::PreZygoteFork() { +void Runtime::PreZygoteFork() { heap_->PreZygoteFork(); - return true; } void Runtime::CallExitHook(jint status) { diff --git a/runtime/runtime.h b/runtime/runtime.h index 7b3e04c..e94072c 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -355,7 +355,7 @@ class Runtime { void SetStatsEnabled(bool new_state); - bool PreZygoteFork(); + void PreZygoteFork(); bool InitZygote(); void DidForkFromZygote(); |