Bug 233864

Summary: webpushd/webpushtool debugging additions
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebKit Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch v1
achristensen: review+
PFL v1
ews-feeder: commit-queue-
PFL v2 none

Description Brady Eidson 2021-12-05 21:28:03 PST
webpushd/webpushtool debugging additions

Add more debug messages.
Add ability for webpushtool to reconnect when connection is lost.
Comment 1 Brady Eidson 2021-12-05 21:49:38 PST
Created attachment 445994 [details]
Patch v1
Comment 2 Alex Christensen 2021-12-06 12:42:43 PST
Comment on attachment 445994 [details]
Patch v1

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

> Source/WebKit/ChangeLog:14
> +        * WebKit.xcodeproj/xcshareddata/xcschemes/webpushd.xcscheme: Added.

why?

> Source/WebKit/webpushd/PushClientConnection.mm:115
> +        messageIdentifier = makeString ("[(0x", hex((uint64_t)(m_xpcConnection.get()), WTF::HexConversionMode::Lowercase), ")] ");

reinterpret_cast

> Source/WebKit/webpushd/PushClientConnection.mm:117
> +        messageIdentifier = makeString ("[", signingIdentifer, " (0x", hex((uint64_t)(m_xpcConnection.get()), WTF::HexConversionMode::Lowercase), ")] ");

ditto

> Source/WebKit/webpushd/WebPushDaemon.mm:184
> +    broadcastDebugMessage((JSC::MessageLevel)0, makeString("New connection: 0x", hex((uint64_t)connection, WTF::HexConversionMode::Lowercase)));

JSC::MessageLevel::Log

> Source/WebKit/webpushd/webpushtool/WebPushToolConnection.h:39
> +enum class PreferTestService {

: bool

> Source/WebKit/webpushd/webpushtool/WebPushToolConnection.h:44
> +enum class Reconnect {

: bool
Comment 3 Brady Eidson 2021-12-06 13:26:54 PST
Created attachment 446079 [details]
PFL v1
Comment 4 Brady Eidson 2021-12-06 13:33:54 PST
The style check failure is a bogus bug because of how the string I'm constructing looks. Bummer.
Comment 5 EWS 2021-12-06 15:50:54 PST
ChangeLog entry in Tools/ChangeLog contains OOPS!.
Comment 6 Brady Eidson 2021-12-06 16:09:44 PST
Created attachment 446090 [details]
PFL v2
Comment 7 EWS 2021-12-06 16:38:17 PST
Committed r286579 (?): <https://commits.webkit.org/r286579>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 446090 [details].
Comment 8 Radar WebKit Bug Importer 2021-12-06 16:39:25 PST
<rdar://problem/86130115>