nativebridge: Add PreZygoteFork callback
It's required to clean-up the emulated enviroment (e.g. close file
descriptors) after emulated execution in doPreload() in app-zygote.
Test: NativeBridge6PreZygoteFork_test
Test: CtsSeccompHostTestCases
android.seccomp.cts.SeccompHostJUnit4DeviceTest
testAppZygoteSyscalls
both for Q.sdk_gphone_x86_arm.armeabi-v7a
Bug: 146904103
Change-Id: Id192a1647c2f405570bf196daf65b3f2a9faca42
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 0dc93c3..fa1916a 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -688,6 +688,7 @@
GetJit()->PreZygoteFork();
}
heap_->PreZygoteFork();
+ PreZygoteForkNativeBridge();
}
void Runtime::PostZygoteFork() {