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 9fb8909..44443ec 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.
 2009-04-21  Jon Honeycutt  <jhoneycutt@apple.com>
 
         Allow the UI delegate to control cursor-setting.
index f0e0a70..971442c 100644 (file)
@@ -136,6 +136,12 @@ HRESULT STDMETHODCALLTYPE WebError::localizedDescription(
         return E_POINTER;
 
     *result = BString(m_error.localizedDescription()).release();
         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;
 }
 
     return S_OK;
 }
 
index 1c5773f..750aa3a 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.
 2009-04-20  Steve Falkenburg  <sfalken@apple.com>
 
         Separate JavaScriptCore.dll from WebKit.dll.
index 2fae494..d2183d4 100644 (file)
@@ -76,4 +76,6 @@ void wkCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bo
 
 unsigned wkInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
 
 
 unsigned wkInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
 
+CFStringRef wkCFNetworkErrorGetLocalizedDescription(CFIndex errorCode);
+
 #endif // WebKitSystemInterface_h
 #endif // WebKitSystemInterface_h
index 0efac06..718f791 100644 (file)
Binary files a/WebKitLibraries/win/lib/WebKitSystemInterface.lib and b/WebKitLibraries/win/lib/WebKitSystemInterface.lib differ
index ce3af5d..02b431a 100644 (file)
Binary files a/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib and b/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib differ