Bug 133897

Summary: Make GenericCallback variadic
Product: WebKit Reporter: mitz
Component: WebKit2Assignee: mitz
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, cgarcia, clopez, mrobinson, ossy, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Make GenericCallback variadic, get rid of legacy callback functions, etc. sam: review+

Description mitz 2014-06-13 22:18:07 PDT
Make GenericCallback variadic
Comment 1 mitz 2014-06-13 22:25:10 PDT
Created attachment 233104 [details]
Make GenericCallback variadic, get rid of legacy callback functions, etc.
Comment 2 mitz 2014-06-13 22:32:45 PDT
Committed <http://trac.webkit.org/r169962>.
Comment 3 Csaba Osztrogonác 2014-06-14 02:22:49 PDT
(In reply to comment #2)
> Committed <http://trac.webkit.org/r169962>.

It broke the GTK build:

../../Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp: In function ‘void webkitPrintOperationPrintPagesForFrame(WebKitPrintOperation*, WebKit::WebFrameProxy*, GtkPrintSettings*, GtkPageSetup*)’:
../../Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp:279:6: error: no matching function for call to ‘WebKit::GenericCallback<API::Error*>::create(webkitPrintOperationPrintPagesForFrame(WebKitPrintOperation*, WebKit::WebFrameProxy*, GtkPrintSettings*, GtkPageSetup*)::__lambda3)’
     }));
      ^
../../Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp:279:6: note: candidate is:
In file included from ../../Source/WebKit2/UIProcess/WebFrameProxy.h:31:0,
                 from ../../Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperationPrivate.h:24,
                 from ../../Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp:23:
../../Source/WebKit2/UIProcess/GenericCallback.h:132:40: note: static WTF::PassRefPtr<WebKit::GenericCallback<T> > WebKit::GenericCallback<T>::create(WebKit::GenericCallback<T>::CallbackFunction) [with T = {API::Error*}; WebKit::GenericCallback<T>::CallbackFunction = std::function<void(API::Error*, WebKit::CallbackBase::Error)>]
     static PassRefPtr<GenericCallback> create(CallbackFunction callback)
                                        ^
../../Source/WebKit2/UIProcess/GenericCallback.h:132:40: note:   no known conversion for argument 1 from ‘webkitPrintOperationPrintPagesForFrame(WebKitPrintOperation*, WebKit::WebFrameProxy*, GtkPrintSettings*, GtkPageSetup*)::__lambda3’ to ‘WebKit::GenericCallback<API::Error*>::CallbackFunction {aka std::function<void(API::Error*, WebKit::CallbackBase::Error)>}’