intl/icu/source/common/uassert.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 /*
     2 ******************************************************************************
     3 *
     4 *   Copyright (C) 2002-2011, International Business Machines
     5 *   Corporation and others.  All Rights Reserved.
     6 *
     7 ******************************************************************************
     8 *
     9 * File uassert.h
    10 *
    11 *  Contains U_ASSERT macro
    12 *
    13 *    By default, U_ASSERT just wraps the C library assert macro.
    14 *    By changing the definition here, the assert behavior for ICU can be changed
    15 *    without affecting other non-ICU uses of the C library assert().
    16 *
    17 ******************************************************************************
    18 */
    20 #ifndef U_ASSERT_H
    21 #define U_ASSERT_H
    22 /* utypes.h is included to get the proper define for uint8_t */
    23 #include "unicode/utypes.h"
    24 #if U_DEBUG
    25 #   include <assert.h>
    26 #   define U_ASSERT(exp) assert(exp)
    27 #else
    28 #   define U_ASSERT(exp)
    29 #endif
    30 #endif

mercurial