bug 1161166 - Move some implementation out of ipc headres to not include headres for EndianU32_* r=billm
☠☠ backed out by 34e969da81d9 ☠ ☠
authorBrad Lassey <blassey@mozilla.com>
Tue, 09 Jun 2015 09:56:10 -0400
changeset 279337 4055cc03c5c86c6a7a49aceb897fcf1129ae75e3
parent 279336 7d4c3379ecb3cdf696f906e18f3560bb7d9c9705
child 279338 bf251327c30e02ce3c47893fb3560ccd2a8a4872
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1161166
milestone41.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 1161166 - Move some implementation out of ipc headres to not include headres for EndianU32_* r=billm
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,18 +5,16 @@
 #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
@@ -140,26 +138,22 @@ 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() {
-    return EndianU32_LtoN(GetDataPacket()->data_length);
-  }
+  u_int32_t GetDataLength();
 
   // The message ID may be used as a code identifying the type of message
-  void SetMessageID(int32_t message_id) {
-    GetDataPacket()->id = EndianU32_NtoL(message_id);
-  }
+  void SetMessageID(int32_t message_id);
 
-  int32_t GetMessageID() { return EndianU32_LtoN(GetDataPacket()->id); }
+  int32_t GetMessageID();
 
   // 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,16 +54,31 @@ 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);