Bug 133467

Summary: [EFL]Build error in WebKit2/Shared/Downloads/soup/DownloadSoup.cpp
Product: WebKit Reporter: Tanay <tanay.c>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, commit-queue, ossy, tanay.c
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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.