[Webkit-unassigned] [Bug 24786] WebKitDownload sometimes suggests peculiar filenames
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 20 09:03:34 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=24786
------- Comment #7 from xan.lopez at gmail.com 2009-04-20 09:03 PDT -------
(From update of attachment 29254)
> void ContextMenuClient::downloadURL(const KURL& url)
> {
> - WebKitNetworkRequest* network_request = webkit_network_request_new(url.string().utf8().data());
> - WebKitDownload* download = webkit_download_new(network_request);
> - g_object_unref(network_request);
> + WebKitNetworkRequest* networkRequest = webkit_network_request_new(url.string().utf8().data());
>
> - gboolean handled;
> - g_signal_emit_by_name(m_webView, "download-requested", download, &handled);
> -
> - if (!handled) {
> - webkit_download_cancel(download);
> - g_object_unref(download);
> - return;
> - }
> -
> - webkit_download_start(download);
> + webkit_web_view_request_download(m_webView, networkRequest);
> + g_object_unref(networkRequest);
> }
> +void webkit_web_view_request_download(WebKitWebView* webView, WebKitNetworkRequest* request)
> +{
> + g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
> +
> + WebKitDownload* download = webkit_download_new(request);
> + g_object_unref(request);
> +
Mmm, aren't you unrefing the network request twice now? Once in the
request_download function, and once in the functions called that.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list