From 3929b10d7be8933a16b9433dca3cfefb9fd861c4 Mon Sep 17 00:00:00 2001 From: Brad Lassey Date: Fri, 21 Jan 2011 13:28:44 -0500 Subject: [PATCH] bug 627767 - When starting up fennec, there are two fennec process, don't fork for lib cache when there are no libs to cache r=dougt a=blocking-fennec --- other-licenses/android/APKOpen.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/other-licenses/android/APKOpen.cpp b/other-licenses/android/APKOpen.cpp index 59ee4e78b8e..7389805eb6f 100644 --- a/other-licenses/android/APKOpen.cpp +++ b/other-licenses/android/APKOpen.cpp @@ -695,7 +695,13 @@ Java_org_mozilla_gecko_GeckoAppShell_loadLibs(JNIEnv *jenv, jclass jGeckoAppShel loadLibs(str); jenv->ReleaseStringUTFChars(jApkName, str); - if (extractLibs && cache_mapping) { + bool haveLibsToWrite = false; + if (cache_mapping && extractLibs) + for (int i = 0; i < cache_count && !haveLibsToWrite; i++) + if (cache_mapping[i].buffer) + haveLibsToWrite = true; + + if (haveLibsToWrite) { if (!fork()) { sleep(10); nice(10);