widget/windows/nsdefs.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial