Bug 1598951 Part 1 - Avoid connecting to parent when replaying remotely, r=gsvelto.
☠☠ backed out by eb5a66c10085 ☠ ☠
authorBrian Hackett <bhackett1024@gmail.com>
Thu, 02 Jan 2020 16:27:35 +0000
changeset 508776 cf403935cf9bc721f22f808a539a79fc9aa13720
parent 508775 af6e8b6be5740148d3c342723e28f4bcdf1748e4
child 508777 c5a5a341613b5646f4ee24dea4a52e4667a393cf
push id104192
push userbhackett@mozilla.com
push dateFri, 03 Jan 2020 16:00:40 +0000
treeherderautoland@cf403935cf9b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgsvelto
bugs1598951
milestone73.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1598951 Part 1 - Avoid connecting to parent when replaying remotely, r=gsvelto. Depends on D58436 Differential Revision: https://phabricator.services.mozilla.com/D58437
toolkit/crashreporter/breakpad-client/mac/handler/exception_handler.cc
toolkit/xre/nsEmbedFunctions.cpp
--- a/toolkit/crashreporter/breakpad-client/mac/handler/exception_handler.cc
+++ b/toolkit/crashreporter/breakpad-client/mac/handler/exception_handler.cc
@@ -810,16 +810,17 @@ bool ExceptionHandler::Setup(bool instal
   if (install_handler && result == KERN_SUCCESS)
     if (!InstallHandler())
       return false;
 
   // Don't spawn the handler thread when replaying, as we have not set up
   // exception ports for it to monitor.
   if (result == KERN_SUCCESS && !mozilla::recordreplay::IsReplaying()) {
     // Install the handler in its own thread, detached as we won't be joining.
+    mozilla::recordreplay::AutoPassThroughThreadEvents pt;
     pthread_attr_t attr;
     pthread_attr_init(&attr);
     pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
     int thread_create_result = pthread_create(&handler_thread_, &attr,
                                               &WaitForMessage, this);
     pthread_attr_destroy(&attr);
     result = thread_create_result ? KERN_FAILURE : KERN_SUCCESS;
   }
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
@@ -285,17 +285,17 @@ void XRE_SetProcessType(const char* aPro
 bool
 #if defined(XP_WIN)
 XRE_SetRemoteExceptionHandler(const char* aPipe /*= 0*/,
                               uintptr_t aCrashTimeAnnotationFile)
 #else
 XRE_SetRemoteExceptionHandler(const char* aPipe /*= 0*/)
 #endif
 {
-  recordreplay::AutoPassThroughThreadEvents pt;
+  recordreplay::AutoPassThroughThreadEventsWithLocalReplay pt;
 #if defined(XP_WIN)
   return CrashReporter::SetRemoteExceptionHandler(nsDependentCString(aPipe),
                                                   aCrashTimeAnnotationFile);
 #elif defined(XP_MACOSX)
   return CrashReporter::SetRemoteExceptionHandler(nsDependentCString(aPipe));
 #else
   return CrashReporter::SetRemoteExceptionHandler();
 #endif
@@ -430,17 +430,17 @@ nsresult XRE_InitChildProcess(int aArgc,
 #  if defined(MOZ_SANDBOX)
   // Save the original number of arguments to pass to the sandbox
   // setup routine which also uses the crash server argument.
   int allArgc = aArgc;
 #  endif /* MOZ_SANDBOX */
 
   const char* const mach_port_name = aArgv[--aArgc];
 
-  Maybe<recordreplay::AutoPassThroughThreadEvents> pt;
+  Maybe<recordreplay::AutoPassThroughThreadEventsWithLocalReplay> pt;
   pt.emplace();
 
   const int kTimeoutMs = 1000;
 
   MachSendMessage child_message(0);
   if (!child_message.AddDescriptor(MachMsgPortDescriptor(mach_task_self()))) {
     NS_WARNING("child AddDescriptor(mach_task_self()) failed.");
     return NS_ERROR_FAILURE;