Bug 204323

Summary: [Cocoa] Add _WKInspector SPI to set diagnostic logging delegate for a local Web Inspector
Product: WebKit Reporter: Blaze Burg <bburg>
Component: WebKit APIAssignee: Blaze Burg <bburg>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bburg, cdumez, commit-queue, hi, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Blaze Burg
Reported 2019-11-18 15:06:21 PST
.
Attachments
Patch (14.54 KB, patch)
2019-11-18 16:09 PST, Blaze Burg
no flags
Blaze Burg
Comment 1 2019-11-18 16:09:18 PST
Devin Rousso
Comment 2 2019-11-18 17:16:44 PST
Comment on attachment 383800 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383800&action=review > Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js:80 > + // FIXME: update diagnostic availability and start/stop diagnostic recorders. Why not fill this in as part of this patch? I'd imaging having an `_enabled` member on `WI.DiagnosticController` and moving the logic inside it's constructor to an `enable` function (which is called if `available` is truthy) wouldn't be too large of a diff. This way, until we do fill this in, we aren't even trying to record diagnostic information, which is a complete waste right now. > Source/WebKit/UIProcess/API/Cocoa/_WKInspectorPrivate.h:32 > +@property (nonatomic, weak, setter=_setDiagnosticLoggingDelegate:) id<_WKDiagnosticLoggingDelegate> _diagnosticLoggingDelegate; Shouldn't this also be wrapped by `#if ENABLE(INSPECTOR_TELEMETRY)`?
Blaze Burg
Comment 3 2019-11-19 08:29:51 PST
(In reply to Devin Rousso from comment #2) > Comment on attachment 383800 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=383800&action=review > > > Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js:80 > > + // FIXME: update diagnostic availability and start/stop diagnostic recorders. > > Why not fill this in as part of this patch? I'd imaging having an > `_enabled` member on `WI.DiagnosticController` and moving the logic inside > it's constructor to an `enable` function (which is called if `available` is > truthy) wouldn't be too large of a diff. This way, until we do fill this > in, we aren't even trying to record diagnostic information, which is a > complete waste right now. Due to priority changes I had to declare patch bankruptcy and put up everything in my branch. I'm adding our other initial records presently so this will be coming up soon. > > Source/WebKit/UIProcess/API/Cocoa/_WKInspectorPrivate.h:32 > > +@property (nonatomic, weak, setter=_setDiagnosticLoggingDelegate:) id<_WKDiagnosticLoggingDelegate> _diagnosticLoggingDelegate; > > Shouldn't this also be wrapped by `#if ENABLE(INSPECTOR_TELEMETRY)`?
Blaze Burg
Comment 4 2019-11-19 08:31:36 PST
Comment on attachment 383800 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383800&action=review >>> Source/WebKit/UIProcess/API/Cocoa/_WKInspectorPrivate.h:32 >>> +@property (nonatomic, weak, setter=_setDiagnosticLoggingDelegate:) id<_WKDiagnosticLoggingDelegate> _diagnosticLoggingDelegate; >> >> Shouldn't this also be wrapped by `#if ENABLE(INSPECTOR_TELEMETRY)`? > > It is not allowed to have feature guards in private headers, other than TARGET_OS_* and other system defined macros. So, it's only guarded out in shared code.
Devin Rousso
Comment 5 2019-11-19 10:20:03 PST
Comment on attachment 383800 [details] Patch r=me
WebKit Commit Bot
Comment 6 2019-11-19 10:41:40 PST
Comment on attachment 383800 [details] Patch Clearing flags on attachment: 383800 Committed r252637: <https://trac.webkit.org/changeset/252637>
WebKit Commit Bot
Comment 7 2019-11-19 10:41:42 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2019-11-19 10:42:16 PST
Note You need to log in before you can comment on or make changes to this bug.