Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef NSDEFS_H |
michael@0 | 7 | #define NSDEFS_H |
michael@0 | 8 | |
michael@0 | 9 | #include <windows.h> |
michael@0 | 10 | |
michael@0 | 11 | #ifdef _DEBUG |
michael@0 | 12 | #define BREAK_TO_DEBUGGER DebugBreak() |
michael@0 | 13 | #else |
michael@0 | 14 | #define BREAK_TO_DEBUGGER |
michael@0 | 15 | #endif |
michael@0 | 16 | |
michael@0 | 17 | #ifdef _DEBUG |
michael@0 | 18 | #define VERIFY(exp) if (!(exp)) { GetLastError(); BREAK_TO_DEBUGGER; } |
michael@0 | 19 | #else // !_DEBUG |
michael@0 | 20 | #define VERIFY(exp) (exp) |
michael@0 | 21 | #endif // !_DEBUG |
michael@0 | 22 | |
michael@0 | 23 | // NSPR Win32 modules: |
michael@0 | 24 | // nsWindow, nsSound, and nsClipboard |
michael@0 | 25 | // |
michael@0 | 26 | // Logging can be changed at runtime without recompiling in the General |
michael@0 | 27 | // property page of Visual Studio under the "Environment" property. |
michael@0 | 28 | // |
michael@0 | 29 | // Two variables are of importance to be set: |
michael@0 | 30 | // NSPR_LOG_MODULES and NSPR_LOG_FILE |
michael@0 | 31 | // |
michael@0 | 32 | // NSPR_LOG_MODULES: |
michael@0 | 33 | // NSPR_LOG_MODULES=all:5 (To log everything completely) |
michael@0 | 34 | // NSPR_LOG_MODULES=nsWindow:5,nsSound:5,nsClipboard:5 |
michael@0 | 35 | // (To log windows widget stuff) |
michael@0 | 36 | // NSPR_LOG_MODULES= (To turn off logging) |
michael@0 | 37 | // |
michael@0 | 38 | // NSPR_LOG_FILE: |
michael@0 | 39 | // NSPR_LOG_FILE=C:\nsprlog.txt (To a file on disk) |
michael@0 | 40 | // NSPR_LOG_FILE=WinDebug (To the debug window) |
michael@0 | 41 | // NSPR_LOG_FILE= (To stdout/stderr) |
michael@0 | 42 | |
michael@0 | 43 | #endif // NSDEFS_H |
michael@0 | 44 | |
michael@0 | 45 |