Bug 133467 - [EFL]Build error in WebKit2/Shared/Downloads/soup/DownloadSoup.cpp
Summary: [EFL]Build error in WebKit2/Shared/Downloads/soup/DownloadSoup.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-02 23:24 PDT by Tanay
Modified: 2014-06-05 04:30 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.50 KB, patch)
2014-06-04 03:21 PDT, Tanay
no flags Details | Formatted Diff | Diff
Patch (1.48 KB, patch)
2014-06-04 03:38 PDT, Tanay
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tanay 2014-06-02 23:24:10 PDT
/home/tanay.c/Webkit_svn_checkout/WebKit/Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp: In member function ‘void WebKit::DownloadClient::handleResponseLater(const WebCore::ResourceResponse&)’:
/home/tanay.c/Webkit_svn_checkout/WebKit/Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp:190:128: error: call of overloaded ‘schedule(const char [37], std::_Bind_helper<false, void (WebKit::DownloadClient::*)(), WebKit::DownloadClient* const>::type)’ is ambiguous
/home/tanay.c/Webkit_svn_checkout/WebKit/Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp:190:128: note: candidates are:
In file included from /home/tanay.c/Webkit_svn_checkout/WebKit/Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp:35:0:
/home/tanay.c/Webkit_svn_checkout/WebKit/Source/WTF/wtf/gobject/GMainLoopSource.h:53:29: note: void WTF::GMainLoopSource::schedule(const char*, std::function<void()>, int, std::function<void()>, GMainContext*)
In file included from /home/tanay.c/Webkit_svn_checkout/WebKit/Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp:35:0:
/home/tanay.c/Webkit_svn_checkout/WebKit/Source/WTF/wtf/gobject/GMainLoopSource.h:54:29: note: void WTF::GMainLoopSource::schedule(const char*, std::function<bool()>, int, std::function<void()>, GMainContext*)
Comment 1 Carlos Garcia Campos 2014-06-03 03:49:49 PDT
gcc 4.7 I guess, we need a explicit cast (or constructor) to workaround it
Comment 2 Csaba Osztrogonác 2014-06-03 04:15:15 PDT
(In reply to comment #1)
> gcc 4.7 I guess, we need a explicit cast (or constructor) to workaround it

Do we still support GCC 4.7 ?
Comment 3 Tanay 2014-06-04 03:21:04 PDT
Created attachment 232470 [details]
Patch
Comment 4 Tanay 2014-06-04 03:23:39 PDT
The EFL build bots are using 4.8.1 version. However, I notice this error when compiling with GCC 4.7.3.
Comment 5 Carlos Garcia Campos 2014-06-04 03:26:25 PDT
Comment on attachment 232470 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232470&action=review

> Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp:190
> -        m_handleResponseLater.schedule("[WebKit] DownloadHandleResponseLater", std::bind(&DownloadClient::handleResponse, this));
> +        m_handleResponseLater.schedule("[WebKit] DownloadHandleResponseLater", static_cast<std::function<void()>>(std::bind(&DownloadClient::handleResponse, this)));

I think you can use the function constructor instead of a static cast, something like std::function<void()>(std::bind(&DownloadClient::handleResponse, this)). I think it's cleaner.
Comment 6 Tanay 2014-06-04 03:37:21 PDT
(In reply to comment #5)
> (From update of attachment 232470 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=232470&action=review
> 
> > Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp:190
> > -        m_handleResponseLater.schedule("[WebKit] DownloadHandleResponseLater", std::bind(&DownloadClient::handleResponse, this));
> > +        m_handleResponseLater.schedule("[WebKit] DownloadHandleResponseLater", static_cast<std::function<void()>>(std::bind(&DownloadClient::handleResponse, this)));
> 
> I think you can use the function constructor instead of a static cast, something like std::function<void()>(std::bind(&DownloadClient::handleResponse, this)). I think it's cleaner.


Sure, uploading another patch.
Comment 7 Tanay 2014-06-04 03:38:50 PDT
Created attachment 232471 [details]
Patch
Comment 8 Carlos Garcia Campos 2014-06-04 04:08:11 PDT
Comment on attachment 232471 [details]
Patch

Thanks
Comment 9 WebKit Commit Bot 2014-06-05 04:30:44 PDT
Comment on attachment 232471 [details]
Patch

Clearing flags on attachment: 232471

Committed r169612: <http://trac.webkit.org/changeset/169612>
Comment 10 WebKit Commit Bot 2014-06-05 04:30:47 PDT
All reviewed patches have been landed.  Closing bug.