Changeset 45921 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Jul 15, 2009, 10:20:11 AM (16 years ago)
Author:
[email protected]
Message:

2009-07-15 Yong Li <[email protected]>

Reviewed by George Staikos.

https://bugs.webkit.org/show_bug.cgi?id=27301
Use OutputDebugStringW on WinCE since OutputDebugStringA is not supported
Originally written by Yong Li <[email protected]> and refactored by
Joe Mason <[email protected]>

  • wtf/Assertions.cpp: vprintf_stderr_common
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r45918 r45921  
     12009-07-15  Yong Li  <[email protected]>
     2
     3         Reviewed by George Staikos.
     4
     5         https://bugs.webkit.org/show_bug.cgi?id=27301
     6         Use OutputDebugStringW on WinCE since OutputDebugStringA is not supported
     7         Originally written by Yong Li <[email protected]> and refactored by
     8         Joe Mason <[email protected]>
     9
     10         * wtf/Assertions.cpp: vprintf_stderr_common
     11
    1122009-07-15  Yong Li  <[email protected]>
    213
  • trunk/JavaScriptCore/wtf/Assertions.cpp

    r44922 r45921  
    11/*
    22 * Copyright (C) 2003, 2006, 2007 Apple Inc.  All rights reserved.
     3 * Copyright (C) 2007-2009 Torch Mobile, Inc.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    4647#endif
    4748
     49#if PLATFORM(WINCE)
     50#include <winbase.h>
     51#endif
     52
    4853extern "C" {
    4954
     
    6772        CFRelease(cfFormat);
    6873    } else
    69 #elif COMPILER(MSVC) && !PLATFORM(WINCE)
     74#elif COMPILER(MSVC) && !defined(WINCEBASIC)
    7075    if (IsDebuggerPresent()) {
    7176        size_t size = 1024;
     
    7883
    7984            if (_vsnprintf(buffer, size, format, args) != -1) {
     85#if PLATFORM(WINCE)
     86                // WinCE only supports wide chars
     87                wchar_t* wideBuffer = (wchar_t*)malloc(size * sizeof(wchar_t));
     88                if (wideBuffer == NULL)
     89                    break;
     90                for (unsigned int i = 0; i < size; ++i) {
     91                    if (!(wideBuffer[i] = buffer[i]))
     92                        break;
     93                }
     94                OutputDebugStringW(wideBuffer);
     95                free(wideBuffer);
     96#else
    8097                OutputDebugStringA(buffer);
     98#endif
    8199                free(buffer);
    82100                break;
     
    102120static void printCallSite(const char* file, int line, const char* function)
    103121{
    104 #if PLATFORM(WIN) && defined _DEBUG
     122#if PLATFORM(WIN) && !PLATFORM(WINCE) && defined _DEBUG
    105123    _CrtDbgReport(_CRT_WARN, file, line, NULL, "%s\n", function);
    106124#else
Note: See TracChangeset for help on using the changeset viewer.