Use CompletionHandler instead of DataCallback
Created attachment 419779 [details] Patch
Created attachment 419786 [details] Patch
Created attachment 419790 [details] Patch
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Created attachment 419809 [details] Patch
Created attachment 419812 [details] Patch
http://trac.webkit.org/r272636
<rdar://problem/74174432>
Comment on attachment 419812 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419812&action=review > Source/WebKit/UIProcess/API/glib/WebKitWebResource.cpp:-351 > - if (error != CallbackBase::Error::None) { > - // This fails when the page is closed or frame is destroyed, so we can just cancel the operation. > - g_task_return_new_error(task, G_IO_ERROR, G_IO_ERROR_CANCELLED, _("Operation was cancelled")); > - return; > - } We need to bring this back to fix bug #221672. I think the equivalent now would be to just null check wkData
Comment on attachment 419812 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419812&action=review > Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:2523 > + completionHandler(wrapper(*data), nil); This was a little optimistic. See https://bugs.webkit.org/show_bug.cgi?id=222139