widget/windows/nsdefs.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/windows/nsdefs.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,45 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef NSDEFS_H
    1.10 +#define NSDEFS_H
    1.11 +
    1.12 +#include <windows.h>
    1.13 +
    1.14 +#ifdef _DEBUG
    1.15 +  #define BREAK_TO_DEBUGGER           DebugBreak()
    1.16 +#else   
    1.17 +  #define BREAK_TO_DEBUGGER
    1.18 +#endif  
    1.19 +
    1.20 +#ifdef _DEBUG
    1.21 +  #define VERIFY(exp)                 if (!(exp)) { GetLastError(); BREAK_TO_DEBUGGER; }
    1.22 +#else   // !_DEBUG
    1.23 +  #define VERIFY(exp)                 (exp)
    1.24 +#endif  // !_DEBUG
    1.25 +
    1.26 +// NSPR Win32 modules:
    1.27 +// nsWindow, nsSound, and nsClipboard
    1.28 +//
    1.29 +// Logging can be changed at runtime without recompiling in the General
    1.30 +// property page of Visual Studio under the "Environment" property.
    1.31 +//
    1.32 +// Two variables are of importance to be set: 
    1.33 +// NSPR_LOG_MODULES and NSPR_LOG_FILE
    1.34 +//
    1.35 +// NSPR_LOG_MODULES:
    1.36 +// NSPR_LOG_MODULES=all:5         (To log everything completely)
    1.37 +// NSPR_LOG_MODULES=nsWindow:5,nsSound:5,nsClipboard:5 
    1.38 +//                                (To log windows widget stuff)
    1.39 +// NSPR_LOG_MODULES=              (To turn off logging)
    1.40 +//
    1.41 +// NSPR_LOG_FILE:
    1.42 +// NSPR_LOG_FILE=C:\nsprlog.txt   (To a file on disk)
    1.43 +// NSPR_LOG_FILE=WinDebug         (To the debug window)
    1.44 +// NSPR_LOG_FILE=                 (To stdout/stderr)
    1.45 +
    1.46 +#endif  // NSDEFS_H
    1.47 +
    1.48 +

mercurial