Bug 140655 - [WK2] Stop using WKDiagnosticLoggingResultType.h C API header in Cocoa API
Summary: [WK2] Stop using WKDiagnosticLoggingResultType.h C API header in Cocoa API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-19 19:06 PST by Chris Dumez
Modified: 2015-01-21 10:55 PST (History)
5 users (show)

See Also:


Attachments
WIP Patch (3.01 KB, patch)
2015-01-19 21:08 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (1.55 KB, patch)
2015-01-19 21:45 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (4.64 KB, patch)
2015-01-20 19:06 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

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