gfx/skia/trunk/src/ports/SkDebug_win.cpp

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.

     2 /*
     3  * Copyright 2010 Google Inc.
     4  *
     5  * Use of this source code is governed by a BSD-style license that can be
     6  * found in the LICENSE file.
     7  */
    11 #include "SkTypes.h"
    13 static const size_t kBufferSize = 2048;
    15 #include <stdarg.h>
    16 #include <stdio.h>
    17 #include <windows.h>
    19 void SkDebugf(const char format[], ...) {
    20     char    buffer[kBufferSize + 1];
    21     va_list args;
    23     va_start(args, format);
    24     vprintf(format, args);
    25     va_end(args);
    26     // When we crash on Windows we often are missing a lot of prints. Since we don't really care
    27     // about SkDebugf performance we flush after every print.
    28     fflush(stdout);
    30     va_start(args, format);
    31     vsnprintf(buffer, kBufferSize, format, args);
    32     va_end(args);
    34     OutputDebugStringA(buffer);
    35 }

mercurial