Bug 133897 - Make GenericCallback variadic
Summary: Make GenericCallback variadic
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: mitz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-13 22:18 PDT by mitz
Modified: 2014-06-14 02:22 PDT (History)
6 users (show)

See Also:


Attachments
Make GenericCallback variadic, get rid of legacy callback functions, etc. (29.35 KB, patch)
2014-06-13 22:25 PDT, mitz
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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)>}’