WebKitLibraries:
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Apr 2009 01:43:07 +0000 (01:43 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Apr 2009 01:43:07 +0000 (01:43 +0000)
        Update WebKitSystemInterface with new method that maps CFNetwork error code to localized description.

        Reviewed by Darin Adler.

        * win/include/WebKitSystemInterface/WebKitSystemInterface.h:
        * win/lib/WebKitSystemInterface.lib:
        * win/lib/WebKitSystemInterface_debug.lib:

WebKit/win:
        <rdar://problem/5115298> Don't get error msg when download is interrupted and cannot resume due to server unavailability
        If we fail to get an error description back from CFNetwork, try to get the localized description
        based on the error code.

        Reviewed by Darin Adler.

        * WebError.cpp:
        (WebError::localizedDescription):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@42767 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/win/ChangeLog
WebKit/win/WebError.cpp
WebKitLibraries/ChangeLog
WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h
WebKitLibraries/win/lib/WebKitSystemInterface.lib
WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib

index 9fb89094f7eb4b2b5e8800caf92d713f3524a20c..44443ec17c1a7b693830d40589c5b25e35c4d615 100644 (file)
@@ -1,3 +1,14 @@
+2009-04-22  Ada Chan  <adachan@apple.com>
+
+        <rdar://problem/5115298> Don't get error msg when download is interrupted and cannot resume due to server unavailability
+        If we fail to get an error description back from CFNetwork, try to get the localized description
+        based on the error code.
+
+        Reviewed by Darin Adler.
+
+        * WebError.cpp:
+        (WebError::localizedDescription):
+
 2009-04-21  Jon Honeycutt  <jhoneycutt@apple.com>
 
         Allow the UI delegate to control cursor-setting.
index f0e0a70ac7d80d16f374e4c5547374835cb07b6e..971442cffa4886974b20916e13cda4976253a582 100644 (file)
@@ -136,6 +136,12 @@ HRESULT STDMETHODCALLTYPE WebError::localizedDescription(
         return E_POINTER;
 
     *result = BString(m_error.localizedDescription()).release();
+
+    if (!*result) {
+        if (int code = m_error.errorCode())
+            *result = BString(wkCFNetworkErrorGetLocalizedDescription(code)).release();
+    }
+
     return S_OK;
 }
 
index 1c5773f547f7f727884dad2b3b68cd94c4108027..750aa3a438d568be53ddfa82eba7c2f2d1afc87c 100644 (file)
@@ -1,3 +1,13 @@
+2009-04-22  Ada Chan  <adachan@apple.com>
+
+        Update WebKitSystemInterface with new method that maps CFNetwork error code to localized description.
+        
+        Reviewed by Darin Adler.
+
+        * win/include/WebKitSystemInterface/WebKitSystemInterface.h:
+        * win/lib/WebKitSystemInterface.lib:
+        * win/lib/WebKitSystemInterface_debug.lib:
+
 2009-04-20  Steve Falkenburg  <sfalken@apple.com>
 
         Separate JavaScriptCore.dll from WebKit.dll.
index 2fae494203a68a4f7c67856f8c13f3cced22c1da..d2183d4a60048e5fe7a2c093eb5132dde7f6dd67 100644 (file)
@@ -76,4 +76,6 @@ void wkCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bo
 
 unsigned wkInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
 
+CFStringRef wkCFNetworkErrorGetLocalizedDescription(CFIndex errorCode);
+
 #endif // WebKitSystemInterface_h
index 0efac06dc4cd3442e615fa12e1223f2e5943f0b3..718f791838d5176c236c158f6c4d314a70116a37 100644 (file)
Binary files a/WebKitLibraries/win/lib/WebKitSystemInterface.lib and b/WebKitLibraries/win/lib/WebKitSystemInterface.lib differ
index ce3af5d8ce57759fa3ce44ddb198ae9ec5d1b25d..02b431a802382ec90a570360aeaf2b1371662e8e 100644 (file)
Binary files a/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib and b/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib differ