Bug 136190

Summary: [GTK] Compilation error in LayerTreeHostGtk.cpp and PluginInfoCache.cpp
Product: WebKit Reporter: Hyungwook Lee <withlhw>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: pnormand, zan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patches 01 none

Description Hyungwook Lee 2014-08-22 19:13:54 PDT
When I compile WebKit GTK port, It makes compilation error as below.

../../Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: In member function ‘void WebKit::LayerTreeHostGtk::layerFlushTimerFired()’:
../../Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:292:129: error: call of overloaded ‘scheduleAfterDelay(const char [25], std::_Bind_helper<false, void (WebKit::LayerTreeHostGtk::*)(), WebKit::LayerTreeHostGtk* const>::type, std::enable_if<true, std::chrono::duration<long int, std::ratio<1l, 1000l> > >::type, int)’ is ambiguous
../../Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:292:129: note: candidates are:
In file included from ../../Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.h:39:0,
                 from ../../Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:28:
../../Source/WTF/wtf/gobject/GMainLoopSource.h:56:29: note: void WTF::GMainLoopSource::scheduleAfterDelay(const char*, std::function<void()>, std::chrono::milliseconds, int, std::function<void()>, GMainContext*)
../../Source/WTF/wtf/gobject/GMainLoopSource.h:57:29: note: void WTF::GMainLoopSource::scheduleAfterDelay(const char*, std::function<bool()>, std::chrono::milliseconds, int, std::function<void()>, GMainContext*)
../../Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: In member function ‘virtual void WebKit::LayerTreeHostGtk::scheduleLayerFlush()’:
../../Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:392:149: error: call of overloaded ‘schedule(const char [25], std::_Bind_helper<false, void (WebKit::LayerTreeHostGtk::*)(), WebKit::LayerTreeHostGtk* const>::type, int)’ is ambiguous
../../Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:392:149: note: candidates are:
In file included from ../../Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.h:39:0,
                 from ../../Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:28:
../../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 ../../Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.h:39:0,
                 from ../../Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:28:
Comment 1 Hyungwook Lee 2014-08-22 20:05:35 PDT
Created attachment 237023 [details]
Patches 01
Comment 2 Zan Dobersek 2014-08-22 23:32:43 PDT
What compiler are you using? Would it be possible for you to use GCC 4.8? This is the version that we'll be requiring in the near future, and should work without a hitch.
Comment 3 Hyungwook Lee 2014-08-24 18:46:38 PDT
I'm using gcc 4.7.3 on Ubuntu 13.04

Many place in WebKit GTK using "std::function<void()>" type casting for make sure.
ex)
m_audioTimerHandler.schedule("[WebKit] MediaPlayerPrivateGStreamer::audioChanged", std::function<void()>(std::bind(&MediaPlayerPrivateGStreamer::notifyPlayerOfAudio, this)));

I think we'd better to put "std::function<void()>" type casting in this case.
Comment 4 Philippe Normand 2014-11-18 09:54:31 PST
Is this still an issue with current trunk?
Comment 5 Hyungwook Lee 2014-12-01 20:18:48 PST
Yes, there is no problem when I upgrade gcc compiler to 4.8.x

Thanks.
Comment 6 Philippe Normand 2014-12-01 23:14:48 PST
Let's close this bug then.