Bug 1511140 - Declare PRINT_MACH_RESULT only once r=Ehsan
authorSylvestre Ledru <sledru@mozilla.com>
Thu, 29 Nov 2018 20:21:29 +0000
changeset 450605 914b2e8e71e124375d682bb3d1f732c75dd72548
parent 450604 df8965873cb35fc19a92b2c9d7809da5643d2d8a
child 450606 3ed441e5310db4207b0b3ae1c3a82d7c9f95f4f3
push id272
push usereakhgari@mozilla.com
push dateThu, 13 Dec 2018 22:29:46 +0000
treeherdermozilla-esr60@ff97c7a84632 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersEhsan
bugs1511140
milestone60.4.1
Bug 1511140 - Declare PRINT_MACH_RESULT only once r=Ehsan Differential Revision: https://phabricator.services.mozilla.com/D13458
ipc/chromium/src/chrome/common/mach_ipc_mac.h
toolkit/crashreporter/google-breakpad/src/common/mac/MachIPC.h
--- a/ipc/chromium/src/chrome/common/mach_ipc_mac.h
+++ b/ipc/chromium/src/chrome/common/mach_ipc_mac.h
@@ -62,18 +62,20 @@
 //    message.AddDescriptor(mach_thread_self());   // this thread
 //
 //    char messageString[] = "Hello server!\n";
 //    message.SetData(messageString, strlen(messageString)+1);
 //    // timeout 1000ms
 //    kern_return_t result = sender.SendMessage(message, 1000);
 //
 
+#ifndef PRINT_MACH_RESULT
 #define PRINT_MACH_RESULT(result_, message_) \
   printf(message_" %s (%d)\n", mach_error_string(result_), result_ );
+#endif
 
 //==============================================================================
 // A wrapper class for mach_msg_port_descriptor_t (with same memory layout)
 // with convenient constructors and accessors
 class MachMsgPortDescriptor : public mach_msg_port_descriptor_t {
  public:
   // General-purpose constructor
   MachMsgPortDescriptor(mach_port_t in_name,
--- a/toolkit/crashreporter/google-breakpad/src/common/mac/MachIPC.h
+++ b/toolkit/crashreporter/google-breakpad/src/common/mac/MachIPC.h
@@ -90,18 +90,20 @@
 //
 //    char messageString[] = "Hello server!\n";
 //    message.SetData(messageString, strlen(messageString)+1);
 //
 //    kern_return_t result = sender.SendMessage(message, 1000); // timeout 1000ms
 //
 
 namespace google_breakpad {
+#ifndef PRINT_MACH_RESULT
 #define PRINT_MACH_RESULT(result_, message_) \
   printf(message_" %s (%d)\n", mach_error_string(result_), result_ );
+#endif
 
 //==============================================================================
 // A wrapper class for mach_msg_port_descriptor_t (with same memory layout)
 // with convenient constructors and accessors
 class MachMsgPortDescriptor : public mach_msg_port_descriptor_t {
  public:
   // General-purpose constructor
   MachMsgPortDescriptor(mach_port_t in_name,