Bug 1730275 - Move util/Windows.h to util/WindowsWrapper.h so that util/moz.build can be added in a subsequent rev without inducing <windows.h>/"Windows.h" conflicts. r=jandem

Differential Revision: https://phabricator.services.mozilla.com/D125902
This commit is contained in:
Jeff Walden 2021-09-17 17:57:35 +00:00
parent 5912f0b3ff
commit 5daf5fa679
28 changed files with 31 additions and 31 deletions

View File

@ -153,7 +153,7 @@ oddly_ordered_inclnames = set(
"frontend/ReservedWordsGenerated.h",
"gc/StatsPhasesGenerated.h", # Included in the body of gc/Statistics.h
"gc/StatsPhasesGenerated.inc", # Included in the body of gc/Statistics.cpp
"psapi.h", # Must be included after "util/Windows.h" on Windows
"psapi.h", # Must be included after "util/WindowsWrapper.h" on Windows
"machine/endian.h", # Must be included after <sys/types.h> on BSD
"winbase.h", # Must precede other system headers(?)
"windef.h", # Must precede other system headers(?)

View File

@ -27,7 +27,7 @@
#include "js/PropertySpec.h"
#include "js/Wrapper.h"
#include "util/DifferentialTesting.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#include "vm/ArrayBufferObject.h"
#include "vm/GlobalObject.h"
#include "vm/Interpreter.h"

View File

@ -57,7 +57,7 @@
#include "js/Vector.h"
#include "util/Text.h"
#include "util/Unicode.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#include "vm/JSContext.h"
#include "vm/JSFunction.h"
#include "vm/JSObject.h"

View File

@ -9,7 +9,7 @@
// running in the same process.
#ifdef WIN32
# include "util/Windows.h"
# include "util/WindowsWrapper.h"
#else
# define __cdecl
# include <stdarg.h>

View File

@ -10,7 +10,7 @@
#include "mozilla/Atomics.h"
#if defined(XP_WIN)
# include "util/Windows.h"
# include "util/WindowsWrapper.h"
#elif defined(__wasi__)
// Nothing.
#elif defined(XP_UNIX) && !defined(XP_DARWIN)

View File

@ -240,7 +240,7 @@
#include "proxy/DeadObjectProxy.h"
#include "util/DifferentialTesting.h"
#include "util/Poison.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#include "vm/BigIntType.h"
#include "vm/GetterSetter.h"
#include "vm/HelperThreadState.h"

View File

@ -17,7 +17,7 @@
#ifdef XP_WIN
# include "util/Windows.h"
# include "util/WindowsWrapper.h"
# include <psapi.h>
#else

View File

@ -56,7 +56,7 @@
#include "js/Printf.h"
#include "js/UniquePtr.h"
#include "util/Memory.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#include "vm/HelperThreads.h"
#include "vm/Realm.h"
#include "vm/TraceLogging.h"

View File

@ -27,7 +27,7 @@
#include "threading/Mutex.h"
#include "util/Memory.h"
#include "util/Poison.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#include "vm/MutexIDs.h"
#ifdef XP_WIN

View File

@ -27,7 +27,7 @@
#include "jit/arm64/vixl/Cpu-vixl.h"
#include "jit/arm64/vixl/Simulator-vixl.h"
#include "jit/arm64/vixl/Utils-vixl.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#if defined(XP_DARWIN)
# include <libkern/OSCacheControl.h>

View File

@ -11,7 +11,7 @@
#include "jsapi-tests/tests.h"
#if defined(XP_WIN)
# include "util/Windows.h"
# include "util/WindowsWrapper.h"
# include <psapi.h>
#elif defined(__wasi__)
// Nothing.

View File

@ -4190,7 +4190,7 @@ JS_PUBLIC_API bool JS_GetGlobalJitCompilerOption(JSContext* cx,
#if !defined(STATIC_EXPORTABLE_JS_API) && !defined(STATIC_JS_API) && \
defined(XP_WIN)
# include "util/Windows.h"
# include "util/WindowsWrapper.h"
/*
* Initialization routine for the JS DLL.

View File

@ -25,7 +25,7 @@
#include "jit/InlinableNatives.h"
#include "js/Class.h"
#include "js/PropertySpec.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#include "vm/JSAtom.h"
#include "vm/JSContext.h"
#include "vm/Realm.h"

View File

@ -47,7 +47,7 @@
#include "util/GetPidProvider.h" // getpid()
#include "util/StringBuffer.h"
#include "util/Text.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#include "vm/JSObject.h"
#include "vm/TypedArrayObject.h"

View File

@ -168,7 +168,7 @@
#include "util/DifferentialTesting.h"
#include "util/StringBuffer.h"
#include "util/Text.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#include "vm/ArgumentsObject.h"
#include "vm/Compression.h"
#include "vm/ErrorObject.h"

View File

@ -5,7 +5,7 @@
#include "threading/CpuCount.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
uint32_t js::GetCPUCount() {
static uint32_t ncpus = 0;

View File

@ -13,7 +13,7 @@
#include "threading/Thread.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
namespace js {

View File

@ -9,7 +9,7 @@
#include "mozilla/Assertions.h" // MOZ_ASSERT, MOZ_RELEASE_ASSERT, MOZ_CRASH
#ifdef XP_WIN
# include "util/Windows.h"
# include "util/WindowsWrapper.h"
#elif defined(__wasi__)
// Nothing
#elif defined(XP_DARWIN) || defined(DARWIN) || defined(XP_UNIX)

View File

@ -18,7 +18,7 @@
#include "jstypes.h"
#include "util/Poison.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#include "vm/HelperThreads.h"
using namespace js;

View File

@ -4,8 +4,8 @@
* 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/. */
#ifndef util_Windows_h
#define util_Windows_h
#ifndef util_WindowsWrapper_h
#define util_WindowsWrapper_h
/*
* This file is a wrapper around <windows.h> to prevent the mangling of
@ -25,4 +25,4 @@
# undef PASSTHROUGH
#endif
#endif /* util_Windows_h */
#endif /* util_WindowsWrapper_h */

View File

@ -45,7 +45,7 @@
#include "js/PropertySpec.h"
#include "js/SharedArrayBuffer.h"
#include "js/Wrapper.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#include "vm/GlobalObject.h"
#include "vm/Interpreter.h"
#include "vm/JSContext.h"

View File

@ -54,7 +54,7 @@
#include "util/DoubleToString.h"
#include "util/NativeStack.h"
#include "util/Text.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#include "vm/BytecodeUtil.h" // JSDVG_IGNORE_STACK
#include "vm/ErrorObject.h"
#include "vm/ErrorReporting.h"

View File

@ -50,7 +50,7 @@
#include "proxy/DeadObjectProxy.h"
#include "util/Memory.h"
#include "util/Text.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#include "vm/ArgumentsObject.h"
#include "vm/BytecodeUtil.h"
#include "vm/DateObject.h"

View File

@ -17,7 +17,7 @@
#include "js/CharacterEncoding.h"
#include "util/Memory.h"
#include "util/Text.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#include "vm/JSContext.h"
using mozilla::PodCopy;

View File

@ -41,7 +41,7 @@
#if JS_HAS_INTL_API
# include "unicode/uloc.h"
#endif
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#include "vm/DateTime.h"
#include "vm/JSAtom.h"
#include "vm/JSObject.h"

View File

@ -37,7 +37,7 @@
#include "js/Wrapper.h"
#include "util/DifferentialTesting.h"
#include "util/Text.h"
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
#include "vm/ArrayBufferObject.h"
#include "vm/FunctionFlags.h" // js::FunctionFlags
#include "vm/GlobalObject.h"

View File

@ -244,7 +244,7 @@
/* OS communication functions */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#include "util/Windows.h"
#include "util/WindowsWrapper.h"
typedef HMODULE lib_t;
typedef DWORD TIDT;
typedef CRITICAL_SECTION mutex_t;

View File

@ -28,8 +28,8 @@
#include "wasm/WasmInstance.h"
#if defined(XP_WIN)
# include <winternl.h> // must include before util/Windows.h's `#undef`s
# include "util/Windows.h"
# include <winternl.h> // must include before util/WindowsWrapper.h's `#undef`s
# include "util/WindowsWrapper.h"
#elif defined(XP_DARWIN)
# include <mach/exc.h>
# include <mach/mach.h>