Bug 184044

Summary: Further refine cookie read/write logging
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit2Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, cdumez, krollin, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch cdumez: review+

Description Brent Fulgham 2018-03-27 10:02:24 PDT
The existing logging code for cookie reads/writes, partitioning, and blocking was not getting hit for various test cases. This patch revises the logging slightly so that we get more consistent logging during test passes.
Comment 1 Radar WebKit Bug Importer 2018-03-27 10:03:17 PDT
<rdar://problem/38915610>
Comment 2 Brent Fulgham 2018-03-27 10:51:12 PDT
Created attachment 336594 [details]
Patch
Comment 3 Chris Dumez 2018-03-27 10:58:43 PDT
Comment on attachment 336594 [details]
Patch

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

> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:743
> +static String escapeIDForJSON(std::optional<uint64_t> value)

I would use a const & here.

> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:840
> +void NetworkResourceLoader::logCookieInformation(const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const WebCore::URL& firstParty, const WebCore::URL& url, const String& referrer, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, std::optional<uint64_t> identifier)

WebCore:: is not needed.

> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:847
> +        auto partition = WebCore::URL(ParsedURLString, networkStorageSession.cookieStoragePartition(firstParty, url, frameID, pageID));

WebCore:: is not needed.
Comment 4 Brent Fulgham 2018-03-27 12:48:24 PDT
I'll fix the debug issue when landing.
Comment 5 Brent Fulgham 2018-03-27 13:27:57 PDT
Committed r230002: <https://trac.webkit.org/changeset/230002>