Title: [110882] trunk/Source/WebCore
Revision
110882
Author
[email protected]
Date
2012-03-15 14:07:16 -0700 (Thu, 15 Mar 2012)

Log Message

        Assertion failures in checkEncodedString when running WebKit2 tests
        https://bugs.webkit.org/show_bug.cgi?id=67425
        <rdar://problem/11043492>

        Reviewed by Anders Carlsson.

        * platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::cfError):
        * platform/network/mac/ResourceErrorMac.mm: (WebCore::ResourceError::nsError):
        The failing URL is certainly not guaranteed to be valid, so it's not correct to put it back
        into a URL as if it's been normalized by KURL.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (110881 => 110882)


--- trunk/Source/WebCore/ChangeLog	2012-03-15 20:39:51 UTC (rev 110881)
+++ trunk/Source/WebCore/ChangeLog	2012-03-15 21:07:16 UTC (rev 110882)
@@ -1,3 +1,16 @@
+2012-03-15  Alexey Proskuryakov  <[email protected]>
+
+        Assertion failures in checkEncodedString when running WebKit2 tests
+        https://bugs.webkit.org/show_bug.cgi?id=67425
+        <rdar://problem/11043492>
+
+        Reviewed by Anders Carlsson.
+
+        * platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::cfError):
+        * platform/network/mac/ResourceErrorMac.mm: (WebCore::ResourceError::nsError):
+        The failing URL is certainly not guaranteed to be valid, so it's not correct to put it back
+        into a URL as if it's been normalized by KURL.
+
 2012-03-15  Brady Eidson  <[email protected]>
 
         <rdar://problem/11036900> and https://bugs.webkit.org/show_bug.cgi?id=81079

Modified: trunk/Source/WebCore/platform/network/cf/ResourceErrorCF.cpp (110881 => 110882)


--- trunk/Source/WebCore/platform/network/cf/ResourceErrorCF.cpp	2012-03-15 20:39:51 UTC (rev 110881)
+++ trunk/Source/WebCore/platform/network/cf/ResourceErrorCF.cpp	2012-03-15 21:07:16 UTC (rev 110882)
@@ -148,7 +148,7 @@
         if (!m_failingURL.isEmpty()) {
             RetainPtr<CFStringRef> failingURLString(AdoptCF, m_failingURL.createCFString());
             CFDictionarySetValue(userInfo.get(), failingURLStringKey, failingURLString.get());
-            RetainPtr<CFURLRef> url(AdoptCF, KURL(ParsedURLString, m_failingURL).createCFURL());
+            RetainPtr<CFURLRef> url(AdoptCF, CFURLCreateWithString(0, failingURLString.get(), 0));
             CFDictionarySetValue(userInfo.get(), failingURLKey, url.get());
         }
 

Modified: trunk/Source/WebCore/platform/network/mac/ResourceErrorMac.mm (110881 => 110882)


--- trunk/Source/WebCore/platform/network/mac/ResourceErrorMac.mm	2012-03-15 20:39:51 UTC (rev 110881)
+++ trunk/Source/WebCore/platform/network/mac/ResourceErrorMac.mm	2012-03-15 21:07:16 UTC (rev 110882)
@@ -121,9 +121,9 @@
             [userInfo.get() setValue:m_localizedDescription forKey:NSLocalizedDescriptionKey];
 
         if (!m_failingURL.isEmpty()) {
-            NSURL *cocoaURL = KURL(ParsedURLString, m_failingURL);
+            RetainPtr<NSURL> cocoaURL = adoptNS([[NSURL alloc] initWithString:m_failingURL]);
             [userInfo.get() setValue:m_failingURL forKey:@"NSErrorFailingURLStringKey"];
-            [userInfo.get() setValue:cocoaURL forKey:@"NSErrorFailingURLKey"];
+            [userInfo.get() setValue:cocoaURL.get() forKey:@"NSErrorFailingURLKey"];
         }
 
         m_platformError.adoptNS([[NSError alloc] initWithDomain:m_domain code:m_errorCode userInfo:userInfo.get()]);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to