[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 12:46:39 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 01aa7da8b92ebfa6e33d4df05217c17c7dceed8a
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Aug 30 01:46:43 2010 +0000

    2010-08-29  Kwang Yul Seo  <skyul at company100.net>
    
            Reviewed by Kent Tamura.
    
            [BREWMP] Port vprintf_stderr_common
            https://bugs.webkit.org/show_bug.cgi?id=33568
    
            Use BREW's DBGPRINTF to output debug messages.
    
            * wtf/Assertions.cpp:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66345 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 1a6a460..f1fcfe0 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-29  Kwang Yul Seo  <skyul at company100.net>
+
+        Reviewed by Kent Tamura.
+
+        [BREWMP] Port vprintf_stderr_common
+        https://bugs.webkit.org/show_bug.cgi?id=33568
+
+        Use BREW's DBGPRINTF to output debug messages.
+
+        * wtf/Assertions.cpp:
+
 2010-08-28  Gavin Barraclough  <barraclough at apple.com>
 
         Reviewed by Oliver Hunt.
diff --git a/JavaScriptCore/wtf/Assertions.cpp b/JavaScriptCore/wtf/Assertions.cpp
index cadbc91..273e0e0 100644
--- a/JavaScriptCore/wtf/Assertions.cpp
+++ b/JavaScriptCore/wtf/Assertions.cpp
@@ -35,7 +35,7 @@
 #include <CoreFoundation/CFString.h>
 #endif
 
-#if COMPILER(MSVC) && !OS(WINCE)
+#if COMPILER(MSVC) && !OS(WINCE) && !PLATFORM(BREWMP)
 #ifndef WINVER
 #define WINVER 0x0500
 #endif
@@ -50,8 +50,40 @@
 #include <winbase.h>
 #endif
 
+#if PLATFORM(BREWMP)
+#include <AEEStdLib.h>
+#include <wtf/Vector.h>
+#endif
+
 extern "C" {
 
+#if PLATFORM(BREWMP)
+
+static void printLog(const Vector<char>& buffer)
+{
+    // Each call to DBGPRINTF generates at most 128 bytes of output on the Windows SDK.
+    // On Qualcomm chipset targets, DBGPRINTF() comes out the diag port (though this may change).
+    // The length of each output string is constrained even more than on the Windows SDK.
+#if COMPILER(MSVC)
+    const int printBufferSize = 128;
+#else
+    const int printBufferSize = 32;
+#endif
+
+    char printBuffer[printBufferSize + 1];
+    printBuffer[printBufferSize] = 0; // to guarantee null termination
+
+    const char* p = buffer.data();
+    const char* end = buffer.data() + buffer.size();
+    while (p < end) {
+        strncpy(printBuffer, p, printBufferSize);
+        DBGPRINTF(printBuffer);
+        p += printBufferSize;
+    }
+}
+
+#endif
+
 WTF_ATTRIBUTE_PRINTF(1, 0)
 static void vprintf_stderr_common(const char* format, va_list args)
 {
@@ -71,6 +103,16 @@ static void vprintf_stderr_common(const char* format, va_list args)
         CFRelease(str);
         CFRelease(cfFormat);
     } else
+#elif PLATFORM(BREWMP)
+    // When str is 0, the return value is the number of bytes needed
+    // to accept the result including null termination.
+    int size = vsnprintf(0, 0, format, args);
+    if (size > 0) {
+        Vector<char> buffer(size);
+        vsnprintf(buffer.data(), size, format, args);
+        printLog(buffer);
+    }
+
 #elif COMPILER(MSVC) && !defined(WINCEBASIC)
     if (IsDebuggerPresent()) {
         size_t size = 1024;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list