Add a DiagnosticLogging method taking an arbitrary dictionary of values.
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Apr 2019 23:48:55 +0000 (23:48 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Apr 2019 23:48:55 +0000 (23:48 +0000)
commit7664bb5aed6c073009a024cec2085dfae8f340fe
treea4edc85e4f6c7052635369aaf4d0a68870fa5e7e
parentb7efc7193320ca7df52145cdd5380c5cec197402
Add a DiagnosticLogging method taking an arbitrary dictionary of values.
https://bugs.webkit.org/show_bug.cgi?id=196773

Source/WebCore:

Patch by Jer Noble <jer.noble@apple.com> on 2019-04-15
Reviewed by Alex Christensen.

* page/DiagnosticLoggingClient.h:

Source/WebKit:

Patch by Jer Noble <jer.noble@apple.com> on 2019-04-15
Reviewed by Alex Christensen.

In addition to adding the new logging delegate method (and piping everything into it),
add a new APIObject class to represent a signed integer.

* Shared/API/APINumber.h:
* Shared/API/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* Shared/Cocoa/WKNSNumber.mm:
(-[WKNSNumber dealloc]):
(-[WKNSNumber objCType]):
(-[WKNSNumber getValue:]):
(-[WKNSNumber longLongValue]):
(-[WKNSNumber _apiObject]):
* Shared/UserData.cpp:
(WebKit::UserData::encode):
(WebKit::UserData::decode):
* UIProcess/API/APIDiagnosticLoggingClient.h:
* UIProcess/API/C/WKPageDiagnosticLoggingClient.h:
* UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
* UIProcess/Cocoa/DiagnosticLoggingClient.h:
* UIProcess/Cocoa/DiagnosticLoggingClient.mm:
(WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithValueDictionary):
* UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::didReceiveMessage):
* UIProcess/WebPageDiagnosticLoggingClient.cpp:
(WebKit::WebPageDiagnosticLoggingClient::logDiagnosticMessageWithValueDictionary):
* UIProcess/WebPageDiagnosticLoggingClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::logDiagnosticMessageWithValueDictionary):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValueDictionary):
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:

Tools:

Reviewed by Jer Noble.

* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDiagnosticLogging.mm:
(-[TestLoggingDelegate _webView:logDiagnosticMessage:description:valueDictionary:]):
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
25 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/EmptyClients.cpp
Source/WebCore/page/DiagnosticLoggingClient.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/ChangeLog
Source/WebKit/Shared/API/APINumber.h
Source/WebKit/Shared/API/APIObject.h
Source/WebKit/Shared/Cocoa/APIObject.mm
Source/WebKit/Shared/Cocoa/WKNSNumber.mm
Source/WebKit/Shared/UserData.cpp
Source/WebKit/UIProcess/API/APIDiagnosticLoggingClient.h
Source/WebKit/UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h
Source/WebKit/UIProcess/Cocoa/DiagnosticLoggingClient.h
Source/WebKit/UIProcess/Cocoa/DiagnosticLoggingClient.mm
Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
Source/WebKit/UIProcess/WebPageDiagnosticLoggingClient.h
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebPageProxy.messages.in
Source/WebKit/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDiagnosticLogging.mm