[GTK] Fix return value of WebKitDownload::created-destination
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 12 Jan 2014 08:45:48 +0000 (08:45 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 12 Jan 2014 08:45:48 +0000 (08:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=126741

Reviewed by Martin Robinson.

Source/WebKit2:

WebKitDownload::created-destination signal should be void instead
of gboolean. This doesn't break the API/ABI.

* UIProcess/API/gtk/WebKitDownload.cpp:
(webkit_download_class_init):
(webkitDownloadDestinationCreated):

Tools:

* TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp: Fix return
value of several callbacks.

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/WebKitDownload.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp

index f688a23..aad958a 100644 (file)
@@ -1,3 +1,17 @@
+2014-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK] Fix return value of WebKitDownload::created-destination
+        https://bugs.webkit.org/show_bug.cgi?id=126741
+
+        Reviewed by Martin Robinson.
+
+        WebKitDownload::created-destination signal should be void instead
+        of gboolean. This doesn't break the API/ABI.
+
+        * UIProcess/API/gtk/WebKitDownload.cpp:
+        (webkit_download_class_init):
+        (webkitDownloadDestinationCreated):
+
 2014-01-11  Yongjun Zhang  <yongjun_zhang@apple.com>
 
         Support bool argument for encoding/decoding invocations.
index e9524c2..ff6d2c4 100644 (file)
@@ -264,13 +264,14 @@ static void webkit_download_class_init(WebKitDownloadClass* downloadClass)
      * created successfully at @destination.
      */
     signals[CREATED_DESTINATION] =
-        g_signal_new("created-destination",
-                     G_TYPE_FROM_CLASS(objectClass),
-                     G_SIGNAL_RUN_LAST,
-                     0, 0, 0,
-                     g_cclosure_marshal_VOID__STRING,
-                     G_TYPE_BOOLEAN, 1,
-                     G_TYPE_STRING);
+        g_signal_new(
+            "created-destination",
+            G_TYPE_FROM_CLASS(objectClass),
+            G_SIGNAL_RUN_LAST,
+            0, 0, 0,
+            g_cclosure_marshal_VOID__STRING,
+            G_TYPE_NONE, 1,
+            G_TYPE_STRING);
 }
 
 WebKitDownload* webkitDownloadCreate(DownloadProxy* downloadProxy)
@@ -382,8 +383,7 @@ void webkitDownloadDestinationCreated(WebKitDownload* download, const CString& d
 {
     if (download->priv->isCancelled)
         return;
-    gboolean returnValue;
-    g_signal_emit(download, signals[CREATED_DESTINATION], 0, destinationURI.data(), &returnValue);
+    g_signal_emit(download, signals[CREATED_DESTINATION], 0, destinationURI.data(), nullptr);
 }
 
 /**
index 54cb0c3..5d124ca 100644 (file)
@@ -1,3 +1,13 @@
+2014-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK] Fix return value of WebKitDownload::created-destination
+        https://bugs.webkit.org/show_bug.cgi?id=126741
+
+        Reviewed by Martin Robinson.
+
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp: Fix return
+        value of several callbacks.
+
 2014-01-11  Sam Weinig  <sam@webkit.org>
 
         Add support for null StringViews
index 867824f..b7ca73a 100644 (file)
@@ -52,31 +52,27 @@ public:
         test->receivedResponse(download);
     }
 
-    static gboolean createdDestinationCallback(WebKitDownload* download, const gchar* destination, DownloadTest* test)
+    static void createdDestinationCallback(WebKitDownload* download, const gchar* destination, DownloadTest* test)
     {
         g_assert(webkit_download_get_destination(download));
         g_assert_cmpstr(webkit_download_get_destination(download), ==, destination);
         test->createdDestination(download, destination);
-        return TRUE;
     }
 
-    static gboolean receivedDataCallback(WebKitDownload* download, guint64 dataLength, DownloadTest* test)
+    static void receivedDataCallback(WebKitDownload* download, guint64 dataLength, DownloadTest* test)
     {
         test->receivedData(download, dataLength);
-        return TRUE;
     }
 
-    static gboolean finishedCallback(WebKitDownload* download, DownloadTest* test)
+    static void finishedCallback(WebKitDownload* download, DownloadTest* test)
     {
         test->finished(download);
-        return TRUE;
     }
 
-    static gboolean failedCallback(WebKitDownload* download, GError* error, DownloadTest* test)
+    static void failedCallback(WebKitDownload* download, GError* error, DownloadTest* test)
     {
         g_assert(error);
         test->failed(download, error);
-        return TRUE;
     }
 
     static gboolean decideDestinationCallback(WebKitDownload* download, const gchar* suggestedFilename, DownloadTest* test)