Eliminate Assertions.h's dependency on Types.h, for a narrower interface and minimized dependencies. No bug, r=Ms2ger
authorJeff Walden <jwalden@mit.edu>
Mon, 11 Jun 2012 16:16:46 -0700
changeset 102045 617cb36ead5971a182c09298ea2d457aeaf3fd9f
parent 102044 b3067d05a76a2bc8c3f5f4fb1bb30464a2c6a0fa
child 102046 1c5a8d617bff300a1b6e3e96e9b4c79fdd69d553
push id1316
push userakeybl@mozilla.com
push dateMon, 27 Aug 2012 22:37:00 +0000
treeherdermozilla-beta@db4b09302ee2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
milestone16.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
Eliminate Assertions.h's dependency on Types.h, for a narrower interface and minimized dependencies. No bug, r=Ms2ger
mfbt/Assertions.h
mfbt/HashFunctions.cpp
mfbt/HashFunctions.h
--- a/mfbt/Assertions.h
+++ b/mfbt/Assertions.h
@@ -4,18 +4,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Implementations of runtime and static assertion macros for C and C++. */
 
 #ifndef mozilla_Assertions_h_
 #define mozilla_Assertions_h_
 
 #include "mozilla/Attributes.h"
-#include "mozilla/Types.h"
 
+#include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
 #ifdef WIN32
    /*
     * TerminateProcess and GetCurrentProcess are defined in <winbase.h>, which
     * further depends on <windef.h>.  We hardcode these few definitions manually
     * because those headers clutter the global namespace with a significant
     * number of undesired macros and symbols.
--- a/mfbt/HashFunctions.cpp
+++ b/mfbt/HashFunctions.cpp
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Implementations of hash functions. */
 
 #include "mozilla/HashFunctions.h"
+#include "mozilla/Types.h"
 
 #include <string.h>
 
 namespace mozilla {
 
 MFBT_API(uint32_t)
 HashBytes(const void* bytes, size_t length)
 {
--- a/mfbt/HashFunctions.h
+++ b/mfbt/HashFunctions.h
@@ -43,16 +43,17 @@
  */
 
 #ifndef mozilla_HashFunctions_h_
 #define mozilla_HashFunctions_h_
 
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/StandardInteger.h"
+#include "mozilla/Types.h"
 
 #ifdef __cplusplus
 namespace mozilla {
 
 /**
  * The golden ratio as a 32-bit fixed-point value.
  */
 static const uint32_t GoldenRatioU32 = 0x9E3779B9U;