Bug 196773

Summary: Add a DiagnosticLogging method taking an arbitrary dictionary of values.
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, benjamin, cdumez, cmarcelo, dbates, eric.carlson, ews-watchlist, japhet, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch jer.noble: review+

Description Jer Noble 2019-04-10 10:13:54 PDT
Add a DiagnosticLogging method taking an arbitrary dictionary of values.
Comment 1 Jer Noble 2019-04-10 11:32:53 PDT
Created attachment 367143 [details]
Patch
Comment 2 EWS Watchlist 2019-04-10 11:35:40 PDT
Attachment 367143 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/HashFunctions.h:288:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 1 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Alex Christensen 2019-04-10 12:38:57 PDT
Comment on attachment 367143 [details]
Patch

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

Let's add HashTraits<Variant<Types...>> and some WTF tests for this.

> Source/WTF/wtf/HashFunctions.h:222
> +            return std::hash<Variant<Types...>>(a) == std::hash<Variant<Types...>>(b);

This should just use operator== without using std::hash.
Comment 4 Jer Noble 2019-04-10 13:43:07 PDT
Turns out, the VariantHash changes are totally unnecessary. I'll remove them (and separate out that work to another patch).
Comment 5 Jer Noble 2019-04-10 13:44:12 PDT
Created attachment 367157 [details]
Patch
Comment 6 Alex Christensen 2019-04-15 13:47:20 PDT
Comment on attachment 367157 [details]
Patch

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

> Source/WebKit/UIProcess/API/C/WKPageDiagnosticLoggingClient.h:68
> +typedef struct WKPageDiagnosticLoggingClientV2 {

Let's not add to the C API for this.

> Source/WebKit/UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:43
> +- (void)_webView:(WKWebView *)webView logDiagnosticMessage:(NSString *)message description:(NSString *)description valueDictionary:(NSDictionary *)valueDictionary;

Please add a test that this can be called in WKWebViewDiagnosticLogging.mm.
Comment 7 Alex Christensen 2019-04-15 15:14:48 PDT
Comment on attachment 367157 [details]
Patch

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

>> Source/WebKit/UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:43
>> +- (void)_webView:(WKWebView *)webView logDiagnosticMessage:(NSString *)message description:(NSString *)description valueDictionary:(NSDictionary *)valueDictionary;
> 
> Please add a test that this can be called in WKWebViewDiagnosticLogging.mm.

Also add availability macros.
Comment 8 Alex Christensen 2019-04-15 15:36:17 PDT
Comment on attachment 367157 [details]
Patch

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

> Source/WebKit/UIProcess/Cocoa/DiagnosticLoggingClient.h:64
> +        unsigned webviewLogDiagnosticMessageWithValueDictionary : 1;

This is never set :(
Comment 9 Alex Christensen 2019-04-15 16:02:01 PDT
Created attachment 367469 [details]
Patch
Comment 10 Alex Christensen 2019-04-15 16:08:50 PDT
Created attachment 367471 [details]
Patch
Comment 11 Alex Christensen 2019-04-15 16:49:08 PDT
http://trac.webkit.org/r244307
Comment 12 Radar WebKit Bug Importer 2019-04-15 16:50:44 PDT
<rdar://problem/49923704>