BUILD FIX (r146667): ResourceRequest constructor in SynchronousLoaderClient.cpp is...
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Mar 2013 14:41:10 +0000 (14:41 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Mar 2013 14:41:10 +0000 (14:41 +0000)
Fixes the following build failure:

    Source/WebCore/platform/network/SynchronousLoaderClient.cpp:52:15: error: conversion from 'int' to 'const WebCore::ResourceRequest' is ambiguous
        request = 0;
                  ^
    In file included from Source/WebCore/platform/network/SynchronousLoaderClient.cpp:30:
    In file included from Source/WebCore/platform/network/ResourceHandle.h:37:
    In file included from Source/WebCore/platform/network/ios/QuickLook.h:13:
    Source/WebCore/platform/network/cf/ResourceRequest.h:79:9: note: candidate constructor
            ResourceRequest(NSURLRequest *);
            ^
    Source/WebCore/platform/network/cf/ResourceRequest.h:83:9: note: candidate constructor
            ResourceRequest(CFURLRequestRef cfRequest)
            ^
    1 error generated.

* platform/network/SynchronousLoaderClient.cpp:
(WebCore::SynchronousLoaderClient::willSendRequest): If
USE(CFNETWORK) is defined, use static_cast<CFURLRequestRef>(0),
otherwise use static_cast<NSURLRequest *>(0).

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

Source/WebCore/ChangeLog
Source/WebCore/platform/network/SynchronousLoaderClient.cpp

index 29aac54..a588e09 100644 (file)
@@ -1,5 +1,30 @@
 2013-03-23  David Kilzer  <ddkilzer@apple.com>
 
+        BUILD FIX (r146667): ResourceRequest constructor in SynchronousLoaderClient.cpp is ambiguous on iOS
+
+        Fixes the following build failure:
+
+            Source/WebCore/platform/network/SynchronousLoaderClient.cpp:52:15: error: conversion from 'int' to 'const WebCore::ResourceRequest' is ambiguous
+                request = 0;
+                          ^
+            In file included from Source/WebCore/platform/network/SynchronousLoaderClient.cpp:30:
+            In file included from Source/WebCore/platform/network/ResourceHandle.h:37:
+            In file included from Source/WebCore/platform/network/ios/QuickLook.h:13:
+            Source/WebCore/platform/network/cf/ResourceRequest.h:79:9: note: candidate constructor
+                    ResourceRequest(NSURLRequest *);
+                    ^
+            Source/WebCore/platform/network/cf/ResourceRequest.h:83:9: note: candidate constructor
+                    ResourceRequest(CFURLRequestRef cfRequest)
+                    ^
+            1 error generated.
+
+        * platform/network/SynchronousLoaderClient.cpp:
+        (WebCore::SynchronousLoaderClient::willSendRequest): If
+        USE(CFNETWORK) is defined, use static_cast<CFURLRequestRef>(0),
+        otherwise use static_cast<NSURLRequest *>(0).
+
+2013-03-23  David Kilzer  <ddkilzer@apple.com>
+
         BUILD FIX (r146687): setDefaultMIMEType() is unused in ResourceHandleCFNet.cpp on iOS
 
         Fixes the following build failure:
index 5376d99..3a2f16d 100644 (file)
@@ -49,7 +49,11 @@ void SynchronousLoaderClient::willSendRequest(ResourceHandle* handle, ResourceRe
     ASSERT(m_error.isNull());
     m_error = platformBadResponseError();
     m_isDone = true;
-    request = 0;
+#if USE(CFNETWORK)
+    request = static_cast<CFURLRequestRef>(0);
+#else
+    request = static_cast<NSURLRequest *>(0);
+#endif
 }
 
 bool SynchronousLoaderClient::shouldUseCredentialStorage(ResourceHandle*)