summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2019-04-06 11:55:48 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-04-06 11:55:48 +0000
commitb24094f3739ad207dc89df871e80e285eaa1fb41 (patch)
treefaddcf20c5af62de6c689ebd2bc7341500e45015
parentf20d282a6c6ee4adff69e58e3f318d3da671c007 (diff)
parent6c504aebe85ca9fc09b7c8900d61844b5dabe84d (diff)
Merge "Do not start jit profile in app zygote" into qt-dev
-rw-r--r--core/java/android/app/LoadedApk.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index 25e35734202e..e16ce24cbb2c 100644
--- a/core/java/android/app/LoadedApk.java
+++ b/core/java/android/app/LoadedApk.java
@@ -937,7 +937,9 @@ public final class LoadedApk {
//
// It is NOT ok to call this function from the system_server (for any of the packages it
// loads code from) so we explicitly disallow it there.
- if (needToSetupJitProfiles && !ActivityThread.isSystem()) {
+ //
+ // It is not ok to call this in a zygote context where mActivityThread is null.
+ if (needToSetupJitProfiles && !ActivityThread.isSystem() && mActivityThread != null) {
setupJitProfileSupport();
}