Backed out changeset 4055cc03c5c8 (bug 1161166) for causing timeouts on mac os like browser_zbug569342.js on a CLOSED TREE
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 12 Jun 2015 12:38:17 +0200
changeset 266681 34e969da81d9bfb87bdcbccd07d833465d28f75c
parent 266680 9f2682a7fd703d84d4eb6c3f0979c250e08743d9
child 266682 3c6d24af0ac5caa7f557648874fcd2cfccb4b373
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-esr52@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1161166, 569342
milestone41.0a1
backs out4055cc03c5c86c6a7a49aceb897fcf1129ae75e3
Backed out changeset 4055cc03c5c8 (bug 1161166) for causing timeouts on mac os like browser_zbug569342.js on a CLOSED TREE
ipc/chromium/src/chrome/common/mach_ipc_mac.h
ipc/chromium/src/chrome/common/mach_ipc_mac.mm
--- a/ipc/chromium/src/chrome/common/mach_ipc_mac.h
+++ b/ipc/chromium/src/chrome/common/mach_ipc_mac.h
@@ -5,16 +5,18 @@
 #ifndef BASE_MACH_IPC_MAC_H_
 #define BASE_MACH_IPC_MAC_H_
 
 #include <mach/mach.h>
 #include <mach/message.h>
 #include <servers/bootstrap.h>
 #include <sys/types.h>
 
+#include <CoreServices/CoreServices.h>
+
 #include "base/basictypes.h"
 
 //==============================================================================
 // DISCUSSION:
 //
 // The three main classes of interest are
 //
 //  MachMessage:    a wrapper for a mach message of the following form
@@ -138,22 +140,26 @@ class MachMessage {
 
   virtual ~MachMessage();
 
   // The receiver of the message can retrieve the raw data this way
   u_int8_t *GetData() {
     return GetDataLength() > 0 ? GetDataPacket()->data : NULL;
   }
 
-  u_int32_t GetDataLength();
+  u_int32_t GetDataLength() {
+    return EndianU32_LtoN(GetDataPacket()->data_length);
+  }
 
   // The message ID may be used as a code identifying the type of message
-  void SetMessageID(int32_t message_id);
+  void SetMessageID(int32_t message_id) {
+    GetDataPacket()->id = EndianU32_NtoL(message_id);
+  }
 
-  int32_t GetMessageID();
+  int32_t GetMessageID() { return EndianU32_LtoN(GetDataPacket()->id); }
 
   // Adds a descriptor (typically a mach port) to be translated
   // returns true if successful, otherwise not enough space
   bool AddDescriptor(const MachMsgPortDescriptor &desc);
 
   int GetDescriptorCount() const {
                                    return storage_->body.msgh_descriptor_count;
                                  }
--- a/ipc/chromium/src/chrome/common/mach_ipc_mac.mm
+++ b/ipc/chromium/src/chrome/common/mach_ipc_mac.mm
@@ -54,31 +54,16 @@ MachMessage::MachMessage(void *storage, 
 //==============================================================================
 MachMessage::~MachMessage() {
   if (own_storage_) {
     delete storage_;
     storage_ = NULL;
   }
 }
 
-
-u_int32_t MachMessage::GetDataLength() {
-  return EndianU32_LtoN(GetDataPacket()->data_length);
-}
-
-  // The message ID may be used as a code identifying the type of message
-void MachMessage::SetMessageID(int32_t message_id) {
-  GetDataPacket()->id = EndianU32_NtoL(message_id);
-}
-
-int32_t MachMessage::GetMessageID() {
-  return EndianU32_LtoN(GetDataPacket()->id);
-}
-
-
 //==============================================================================
 // returns true if successful
 bool MachMessage::SetData(const void* data,
                           int32_t data_length) {
   // Enforce the fact that it's only safe to call this method once on a
   // message.
   DCHECK(GetDataPacket()->data_length == 0);