[Qt] WTR crashes if a URL is passed as a parameter
authorkbalazs@webkit.org <kbalazs@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jul 2012 11:21:47 +0000 (11:21 +0000)
committerkbalazs@webkit.org <kbalazs@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jul 2012 11:21:47 +0000 (11:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=88093

Reviewed by Zoltan Herczeg.

* Shared/API/c/WKSharedAPICast.h:
(WebKit::toCopiedURLAPI):
Don't special case null string. It's handled
fine by WebURL and passing 0 is not suitable
to the API.

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

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/c/WKSharedAPICast.h

index 772b81e..1fe2426 100644 (file)
@@ -1,3 +1,16 @@
+2012-07-05  Balazs Kelemen  <kbalazs@webkit.org>
+
+        [Qt] WTR crashes if a URL is passed as a parameter
+        https://bugs.webkit.org/show_bug.cgi?id=88093
+
+        Reviewed by Zoltan Herczeg.
+
+        * Shared/API/c/WKSharedAPICast.h:
+        (WebKit::toCopiedURLAPI):
+        Don't special case null string. It's handled
+        fine by WebURL and passing 0 is not suitable
+        to the API.
+
 2012-07-05  Dongwoo Im  <dw.im@samsung.com>
 
         [EFL] Enable the CUSTOM_SCHEME_HANDLER feature as default.
index fd1a896..2fc7763 100644 (file)
@@ -159,8 +159,6 @@ inline ProxyingRefPtr<WebURL> toURLRef(StringImpl* string)
 
 inline WKURLRef toCopiedURLAPI(const String& string)
 {
-    if (!string)
-        return 0;
     RefPtr<WebURL> webURL = WebURL::create(string);
     return toAPI(webURL.release().leakRef());
 }