Bug 140410 - [WK2][iOS] Add Cocoa delegate for logging diagnostic messages
Summary: [WK2][iOS] Add Cocoa delegate for logging diagnostic messages
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: 140486
Blocks: 140463
  Show dependency treegraph
 
Reported: 2015-01-13 14:11 PST by Chris Dumez
Modified: 2015-01-17 17:41 PST (History)
8 users (show)

See Also:


Attachments
Patch (33.17 KB, patch)
2015-01-14 13:09 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (33.25 KB, patch)
2015-01-14 13:48 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (32.89 KB, patch)
2015-01-15 21:41 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (32.72 KB, patch)
2015-01-16 11:26 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (32.69 KB, patch)
2015-01-16 13: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-13 14:11:51 PST
Add Cocoa delegate for logging diagnostic messages. Right now, there is only a WK2 C API client.
Comment 1 Chris Dumez 2015-01-14 13:09:43 PST
Created attachment 244630 [details]
Patch
Comment 2 Chris Dumez 2015-01-14 13:48:36 PST
Created attachment 244634 [details]
Patch
Comment 3 Sam Weinig 2015-01-14 15:47:12 PST
Unless we really need this code to run in the WebProcess, I would rather we IPC this over to the UIProcess and do it there.
Comment 4 Chris Dumez 2015-01-15 21:41:00 PST
Created attachment 244751 [details]
Patch
Comment 5 Chris Dumez 2015-01-16 11:26:24 PST
Created attachment 244777 [details]
Patch
Comment 6 Chris Dumez 2015-01-16 12:58:16 PST
Sam, could you please take another look? I updated the patch now that diagnostic messages go through the UIProcess.
Comment 7 Anders Carlsson 2015-01-16 13:02:36 PST
Comment on attachment 244777 [details]
Patch

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

> Source/WebKit2/UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:38
> +- (void)_webView:(WKWebView *)webView logDiagnosticMessage:(NSString *)message inDescription:(NSString *)description;
> +- (void)_webView:(WKWebView *)webView logDiagnosticMessageWithResult:(NSString *)message inDescription:(NSString *)description inResult:(WKDiagnosticLoggingResultType)result;
> +- (void)_webView:(WKWebView *)webView logDiagnosticMessageWithValue:(NSString *)message inDescription:(NSString *)description inValue:(NSString *) value;

I think these read a little weird, especially the "inDescription" and "inValue" parts.
Comment 8 Chris Dumez 2015-01-16 13:06:42 PST
Created attachment 244796 [details]
Patch
Comment 9 Chris Dumez 2015-01-16 13:08:08 PST
(In reply to comment #7)
> Comment on attachment 244777 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=244777&action=review
> 
> > Source/WebKit2/UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:38
> > +- (void)_webView:(WKWebView *)webView logDiagnosticMessage:(NSString *)message inDescription:(NSString *)description;
> > +- (void)_webView:(WKWebView *)webView logDiagnosticMessageWithResult:(NSString *)message inDescription:(NSString *)description inResult:(WKDiagnosticLoggingResultType)result;
> > +- (void)_webView:(WKWebView *)webView logDiagnosticMessageWithValue:(NSString *)message inDescription:(NSString *)description inValue:(NSString *) value;
> 
> I think these read a little weird, especially the "inDescription" and
> "inValue" parts.

Ok, I am really not familiar with ObjC and its conventions. I switched to description/value/result instead of inDescription/inValue/inResult. Let me know if you have other suggestions so that these read better.
Comment 10 WebKit Commit Bot 2015-01-17 17:41:14 PST
Comment on attachment 244796 [details]
Patch

Clearing flags on attachment: 244796

Committed r178630: <http://trac.webkit.org/changeset/178630>
Comment 11 WebKit Commit Bot 2015-01-17 17:41:19 PST
All reviewed patches have been landed.  Closing bug.