Bug 1481009 Part 4 - Add redirection for crash reporter code, r=froydnj.
☠☠ backed out by e3cec7443adf ☠ ☠
authorBrian Hackett <bhackett1024@gmail.com>
Wed, 08 Aug 2018 16:46:45 +0000
changeset 486207 85eec9cfc3d9ddc06af8b3523833d8e14d1a4884
parent 486206 f7f4127aa9d86a4f7e964e2a2b2131dd149a7c65
child 486208 6869ea5ebd32246bfc155d0a5fa0ad0ea6619580
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1481009
milestone63.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 1481009 Part 4 - Add redirection for crash reporter code, r=froydnj.
toolkit/recordreplay/ProcessRedirectDarwin.cpp
--- a/toolkit/recordreplay/ProcessRedirectDarwin.cpp
+++ b/toolkit/recordreplay/ProcessRedirectDarwin.cpp
@@ -145,16 +145,17 @@ namespace recordreplay {
   MACRO(mach_msg)                               \
   MACRO(mach_timebase_info)                     \
   MACRO(mach_vm_allocate)                       \
   MACRO(mach_vm_deallocate)                     \
   MACRO(mach_vm_protect)                        \
   MACRO(sandbox_free_error)                     \
   MACRO(sandbox_init)                           \
   MACRO(sandbox_init_with_parameters)           \
+  MACRO(task_threads)                           \
   MACRO(vm_copy)                                \
   MACRO(vm_purgable_control)                    \
   MACRO(tzset)                                  \
   /* NSPR functions */                          \
   MACRO(PL_NewHashTable)                        \
   MACRO(PL_HashTableDestroy)                    \
   /* Objective C functions */                   \
   MACRO(class_getClassMethod)                   \
@@ -1504,16 +1505,26 @@ RR_sandbox_init_with_parameters(const ch
 {
   // As for sandbox_init, call this function even while replaying.
   AutoEnsurePassThroughThreadEvents pt;
   return OriginalCall(sandbox_init_with_parameters, ssize_t,
                       aProfile, aFlags, aParameters, aErrorBuf);
 }
 
 static kern_return_t
+RR_task_threads(mach_port_t aTask, thread_act_array_t *aThreads,
+                mach_msg_type_number_t *aNumThreads)
+{
+  // Make sure events are passed through here so that replaying processes can
+  // inspect their own threads.
+  AutoEnsurePassThroughThreadEvents pt;
+  return OriginalCall(task_threads, kern_return_t, aTask, aThreads, aNumThreads);
+}
+
+static kern_return_t
 RR_mach_vm_allocate(vm_map_t aTarget, mach_vm_address_t* aAddress,
                     mach_vm_size_t aSize, int aFlags)
 {
   *aAddress = (mach_vm_address_t) AllocateMemory(aSize, MemoryKind::Tracked);
   return KERN_SUCCESS;
 }
 
 static kern_return_t