diff options
author | Narayan Kamath <narayan@google.com> | 2014-04-02 12:54:23 +0100 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2014-04-02 12:54:23 +0100 |
commit | 3de95a7b0a2d30cde6dc92b72c35df3a61002124 (patch) | |
tree | 56ad920ea31bf3b64595fe56345649db4c679156 | |
parent | ad4b0d2c671a5aa5f11e731eb51a905eb513a266 (diff) | |
download | art-3de95a7b0a2d30cde6dc92b72c35df3a61002124.zip art-3de95a7b0a2d30cde6dc92b72c35df3a61002124.tar.gz art-3de95a7b0a2d30cde6dc92b72c35df3a61002124.tar.bz2 |
Runtime::PreZygoteFork returns void, not boolean.
This method aborts on failure (as it should) and unconditionally
returns true, so making it return void simplifies callers.
Change-Id: Iae39bd327f20311579ece47efa8afd1be7defce9
-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 a830018..9d2cb96 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -269,9 +269,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 ed60d4d..8c3ef0e 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(); |