Bug 140655

Summary: [WK2] Stop using WKDiagnosticLoggingResultType.h C API header in Cocoa API
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue, joepeck, mitz, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP Patch
none
Patch
none
Patch none

Description Chris Dumez 2015-01-19 19:06:07 PST
Stop using WKDiagnosticLoggingResultType.h C API header in Cocoa API. Instead, introduce a _WKDiagnosticLoggingResultType.h Cocoa header to define the WKDiagnosticLoggingResultType enum.
Comment 1 Chris Dumez 2015-01-19 21:08:46 PST
Created attachment 244963 [details]
WIP Patch
Comment 2 Chris Dumez 2015-01-19 21:13:15 PST
Comment on attachment 244963 [details]
WIP Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=244963&action=review

> Source/WebKit2/UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:45
> +- (void)_webView:(WKWebView *)webView logDiagnosticMessageWithResult:(NSString *)message description:(NSString *)description result:(_WKDiagnosticLoggingResultType)result;

This breaks API compatibility unfortunately:
error: conflicting parameter types in declaration of '_webView:logDiagnosticMessageWithResult:description:result:': '_WKDiagnosticLoggingResultType' vs 'WKDiagnosticLoggingResultType' (aka 'unsigned int') [-Werror,-Woverriding-method-mismatch]

Any suggestion how to do the transition? I tried using "typedef NS_ENUM(uint32_t, _WKDiagnosticLoggingResultType)" above so that _WKDiagnosticLoggingResultType and WKDiagnosticLoggingResultType are typedefs to the same type but this does not seem to help...
Comment 3 Brent Fulgham 2015-01-19 21:45:51 PST
Created attachment 244967 [details]
Patch
Comment 4 Brent Fulgham 2015-01-19 21:47:10 PST
Comment on attachment 244967 [details]
Patch

Sorry. I typed the wrong value in the ChangeLog. This patch is not related to this bug.
Comment 5 Chris Dumez 2015-01-20 19:06:45 PST
Created attachment 245042 [details]
Patch
Comment 6 WebKit Commit Bot 2015-01-21 10:54:57 PST
Comment on attachment 245042 [details]
Patch

Clearing flags on attachment: 245042

Committed r178848: <http://trac.webkit.org/changeset/178848>
Comment 7 WebKit Commit Bot 2015-01-21 10:55:01 PST
All reviewed patches have been landed.  Closing bug.