toURLRef() in WKSharedAPICast.h should return null for a null string
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Oct 2011 22:45:29 +0000 (22:45 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Oct 2011 22:45:29 +0000 (22:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=69380

Reviewed by Jon Honeycutt.

* Shared/API/c/WKSharedAPICast.h:
(WebKit::toURLRef): Add the missing "return" for the null string case.

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

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

index a1864d2..6773fa5 100644 (file)
@@ -1,3 +1,13 @@
+2011-10-04  Ada Chan  <adachan@apple.com>
+
+        toURLRef() in WKSharedAPICast.h should return null for a null string
+        https://bugs.webkit.org/show_bug.cgi?id=69380
+
+        Reviewed by Jon Honeycutt.
+
+        * Shared/API/c/WKSharedAPICast.h:
+        (WebKit::toURLRef): Add the missing "return" for the null string case.
+
 2011-10-04  Alexey Proskuryakov  <ap@apple.com>
 
         https://bugs.webkit.org/show_bug.cgi?id=67774
index fe79805..ee1acef 100644 (file)
@@ -151,7 +151,7 @@ inline WKStringRef toCopiedAPI(const String& string)
 inline ProxyingRefPtr<WebURL> toURLRef(StringImpl* string)
 {
     if (!string)
-        ProxyingRefPtr<WebURL>(0);
+        return ProxyingRefPtr<WebURL>(0);
     return ProxyingRefPtr<WebURL>(WebURL::create(String(string)));
 }