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

aroben at apple.com aroben at apple.com
Wed Dec 22 11:25:11 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 06d2d8c6fb2c7e51ceb79de6797423996cdbdd0b
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 22 21:25:32 2010 +0000

    Use ::MessageBox instead of ::DebugBreak to make the web process wait for a debugger
    
    While ::DebugBreak can make it easier to attach a debugger (because it
    brings up the Just-in-Time debugger window), using ::MessageBox has
    two advantages:
      1) It explains to the user what's going on, so it's harder to
         mistake this debugging aid for a bug.
      2) It allows you to debug the UI process and the web process using
         the same debugger, if desired.
    
    Special thanks to John Sullivan for help with the text that's shown in
    the alert.
    
    Fixes <http://webkit.org/b/42848> WebKit2's wait-for-debugger
    debugging aid should explain to the user what's happening
    
    Reviewed by John Sullivan and Anders Carlsson.
    
    * WebProcess/WebKitMain.cpp:
    (WebKitMain): Use a ::MessageBox instead of a ::DebugBreak to wait for
    the debugger. The alert explains to the user what's going on.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63913 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 2f19d42..98834e1 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,5 +1,30 @@
 2010-07-22  Adam Roben  <aroben at apple.com>
 
+        Use ::MessageBox instead of ::DebugBreak to make the web process wait
+        for a debugger
+
+        While ::DebugBreak can make it easier to attach a debugger (because it
+        brings up the Just-in-Time debugger window), using ::MessageBox has
+        two advantages:
+          1) It explains to the user what's going on, so it's harder to
+             mistake this debugging aid for a bug.
+          2) It allows you to debug the UI process and the web process using
+             the same debugger, if desired.
+
+        Special thanks to John Sullivan for help with the text that's shown in
+        the alert.
+
+        Fixes <http://webkit.org/b/42848> WebKit2's wait-for-debugger
+        debugging aid should explain to the user what's happening
+
+        Reviewed by John Sullivan and Anders Carlsson.
+
+        * WebProcess/WebKitMain.cpp:
+        (WebKitMain): Use a ::MessageBox instead of a ::DebugBreak to wait for
+        the debugger. The alert explains to the user what's going on.
+
+2010-07-22  Adam Roben  <aroben at apple.com>
+
         Make WorkQueue aware of potential errors with ::WaitForMultipleObjects
 
         Fixes <http://webkit.org/b/42846> WorkQueue should detect
diff --git a/WebKit2/WebProcess/WebKitMain.cpp b/WebKit2/WebProcess/WebKitMain.cpp
index 3bb3d9c..09cf261 100644
--- a/WebKit2/WebProcess/WebKitMain.cpp
+++ b/WebKit2/WebProcess/WebKitMain.cpp
@@ -55,6 +55,12 @@ int WebKitMain(int argc, char** argv)
 
 #elif PLATFORM(WIN)
 
+#ifndef DEBUG_ALL
+#define PROCESS_NAME L"WebKit2WebKitProcess.exe"
+#else
+#define PROCESS_NAME L"WebKit2WebProcess_debug.exe"
+#endif
+
 static void enableTerminationOnHeapCorruption()
 {
     // Enable termination on heap corruption on OSes that support it (Vista and XPSP3).
@@ -78,11 +84,11 @@ extern "C" __declspec(dllexport)
 int WebKitMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrCmdLine, int nCmdShow)
 {
 #ifndef NDEBUG
-    // Break into the debugger when Ctrl-Alt-Shift is held down during launch. This makes it easier
-    // to debug problems that happen early in the web process's liftime.
+    // Show an alert when Ctrl-Alt-Shift is held down during launch to give the user time to attach a
+    // debugger. This is useful for debugging problems that happen early in the web process's lifetime.
     const unsigned short highBitMaskShort = 0x8000;
     if ((::GetKeyState(VK_CONTROL) & highBitMaskShort) && (::GetKeyState(VK_MENU) & highBitMaskShort) && (::GetKeyState(VK_SHIFT) & highBitMaskShort))
-        ::DebugBreak();
+        ::MessageBoxW(0, L"You can now attach a debugger to " PROCESS_NAME L". You can use\nthe same debugger for WebKit2WebProcessand the UI process, if desired.\nClick OK when you are ready for WebKit2WebProcess to continue.", L"WebKit2WebProcess has launched", MB_OK | MB_ICONINFORMATION);
 #endif
 
     enableTerminationOnHeapCorruption();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list