Bug 43522

Summary: Change callback APIs to include an Error object in one callback, instead of having a second callback for failure.
Product: WebKit Reporter: Brady Eidson <beidson>
Component: New BugsAssignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch sam: review+

Description Brady Eidson 2010-08-04 16:54:38 PDT
Change callback APIs to include an Error object in one callback, instead of having a second callback for failure.
Comment 1 Brady Eidson 2010-08-04 16:58:05 PDT
Created attachment 63513 [details]
Patch
Comment 2 WebKit Review Bot 2010-08-04 17:02:19 PDT
Attachment 63513 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebKit2/UIProcess/API/C/WKAPICast.h:79:  More than one command on the same line  [whitespace/newline] [4]
WebKit2/UIProcess/API/C/WKError.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebKit2/UIProcess/API/C/WKError.cpp:29:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 3 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Sam Weinig 2010-08-04 17:04:26 PDT
Comment on attachment 63513 [details]
Patch

> -
> +        RefPtr<WebError> error = WebError::create();
> +        m_callback(0, toRef(error.release().releaseRef()), m_context);

This would require the reciever of the callback to adopt the error, which I don't think is what we want.  Instead, this should just call error.get().

If you change this, r=me.  Also, what Ada said.
Comment 4 Brady Eidson 2010-08-04 17:06:44 PDT
Committed r64688: <http://trac.webkit.org/changeset/64688>