This method aborts on failure (as it should) and unconditionally
returns true, so making it return void simplifies callers.
Change-Id: Iae39bd327f20311579ece47efa8afd1be7defce9
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();
// notreached
}
-bool Runtime::PreZygoteFork() {
+void Runtime::PreZygoteFork() {
heap_->PreZygoteFork();
- return true;
}
void Runtime::CallExitHook(jint status) {
void SetStatsEnabled(bool new_state);
- bool PreZygoteFork();
+ void PreZygoteFork();
bool InitZygote();
void DidForkFromZygote();