Bug 942486 - Move PL_ARENA_CONST_ALIGN_MASK out of nsZipArchive.h; r=mwu
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 25 Nov 2013 15:44:25 -0500
changeset 157432 cf22f2ea191ec6a4a0fde9e18802c8efc0f6dfdb
parent 157431 2f60d2a1c4fb28a43e29fcd806b1b2e2790b0096
child 157433 c1f37de21c8678584ab4fc64f3460494cc1fd0bc
push id25713
push usercbook@mozilla.com
push dateTue, 26 Nov 2013 11:36:06 +0000
treeherdermozilla-central@99479edbee2a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmwu
bugs942486
milestone28.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 942486 - Move PL_ARENA_CONST_ALIGN_MASK out of nsZipArchive.h; r=mwu
modules/libjar/nsZipArchive.cpp
modules/libjar/nsZipArchive.h
--- a/modules/libjar/nsZipArchive.cpp
+++ b/modules/libjar/nsZipArchive.cpp
@@ -5,16 +5,21 @@
 
 /*
  * This module implements a simple archive extractor for the PKZIP format.
  *
  * The underlying nsZipArchive is NOT thread-safe. Do not pass references
  * or pointers to it across thread boundaries.
  */
 
+// This must be the first include in the file in order for the
+// PL_ARENA_CONST_ALIGN_MASK macro to be effective.
+#define PL_ARENA_CONST_ALIGN_MASK  (sizeof(void*)-1)
+#include "plarena.h"
+
 #define READTYPE  int32_t
 #include "zlib.h"
 #include "nsISupportsUtils.h"
 #include "prio.h"
 #include "plstr.h"
 #include "prlog.h"
 #include "stdlib.h"
 #include "nsWildCard.h"
--- a/modules/libjar/nsZipArchive.h
+++ b/modules/libjar/nsZipArchive.h
@@ -6,21 +6,17 @@
 #ifndef nsZipArchive_h_
 #define nsZipArchive_h_
 
 #include "mozilla/Attributes.h"
 
 #define ZIP_TABSIZE   256
 #define ZIP_BUFLEN    (4*1024)      /* Used as output buffer when deflating items to a file */
 
-#ifndef PL_ARENA_CONST_ALIGN_MASK
-#define PL_ARENA_CONST_ALIGN_MASK  (sizeof(void*)-1)
-#endif
 #include "plarena.h"
-
 #include "zlib.h"
 #include "zipstruct.h"
 #include "nsAutoPtr.h"
 #include "nsIFile.h"
 #include "nsISupportsImpl.h" // For mozilla::ThreadSafeAutoRefCnt
 #include "mozilla/FileUtils.h"
 #include "mozilla/FileLocation.h"