Bug 1440034 - fixed reporting of annotations at the time of crashes on GeckoView; r?rbarker
MozReview-Commit-ID: 8thtJe0QmcE
--- a/ipc/glue/GeckoChildProcessHost.cpp
+++ b/ipc/glue/GeckoChildProcessHost.cpp
@@ -1188,17 +1188,25 @@ GeckoChildProcessHost::LaunchAndroidServ
jni::ObjectArray::LocalRef jargs = jni::ObjectArray::New<jni::String>(argvSize);
for (int ix = 0; ix < argvSize; ix++) {
jargs->SetElement(ix, jni::StringParam(argv[ix].c_str(), env));
}
base::file_handle_mapping_vector::const_iterator it = fds_to_remap.begin();
int32_t ipcFd = it->first;
it++;
// If the Crash Reporter is disabled, there will not be a second file descriptor.
- int32_t crashFd = (it != fds_to_remap.end()) ? it->first : -1;
- int32_t crashAnnotationFd = (it != fds_to_remap.end()) ? it->first : -1;
+ int32_t crashFd = -1;
+ int32_t crashAnnotationFd = -1;
+ if (it != fds_to_remap.end() && !CrashReporter::IsDummy()) {
+ crashFd = it->first;
+ it++;
+ }
+ if (it != fds_to_remap.end()) {
+ crashAnnotationFd = it->first;
+ it++;
+ }
int32_t handle = java::GeckoProcessManager::Start(type, jargs, crashFd, ipcFd, crashAnnotationFd);
if (process_handle) {
*process_handle = handle;
}
}
#endif