Bug 184044 - Further refine cookie read/write logging
Summary: Further refine cookie read/write logging
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
Keywords: InRadar
Depends on:
Reported: 2018-03-27 10:02 PDT by Brent Fulgham
Modified: 2018-03-27 13:27 PDT (History)
4 users (show)

See Also:

Patch (13.09 KB, patch)
2018-03-27 10:51 PDT, Brent Fulgham
cdumez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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
Comment 2 Brent Fulgham 2018-03-27 10:51:12 PDT
Created attachment 336594 [details]
Comment 3 Chris Dumez 2018-03-27 10:58:43 PDT
Comment on attachment 336594 [details]

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>