Clear the boot task at fork.
Bug: 119800099
Test: boot, system server doesn't JIT boot classpath methods.
Change-Id: I83ba0f8f1c48c810856d333b3b355cae0a11f20f
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index ad60546..6964a20 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -1115,6 +1115,11 @@
}
void Jit::PostForkChildAction(bool is_system_server, bool is_zygote) {
+ // Clear the potential boot tasks inherited from the zygote.
+ {
+ MutexLock mu(Thread::Current(), boot_completed_lock_);
+ tasks_after_boot_.clear();
+ }
if (is_zygote || Runtime::Current()->IsSafeMode()) {
// Delete the thread pool, we are not going to JIT.
thread_pool_.reset(nullptr);