Summary: | [Cocoa] Improve logging quality for non-ephemeral sessions | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> | ||||||||||
Component: | WebKit2 | Assignee: | Brent Fulgham <bfulgham> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, ddkilzer, ews-watchlist, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=209522 | ||||||||||||
Attachments: |
|
Description
Brent Fulgham
2020-05-29 16:00:34 PDT
This will give us better ability to investigate page load problems without capturing sensitive user-identifiable logging. Created attachment 400633 [details]
Patch
Created attachment 400635 [details]
Patch
Comment on attachment 400635 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=400635&action=review r- due to build failures. > Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h:80 > +#ifndef NW_CONTEXT_HAS_PRIVACY_LEVEL_SILENT > +#define NW_CONTEXT_HAS_PRIVACY_LEVEL_SILENT 1 > +#endif Why is this needed separately from HAVE(LOGGING_PRIVACY_LEVEL)? > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1033 > + auto loggingPrivacyLevel = nw_context_privacy_level_sensitive; Need to protect this with #if HAVE(LOGGING_PRIVACY_LEVEL)/#endif. > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1041 > +#if defined(NW_CONTEXT_HAS_PRIVACY_LEVEL_SILENT) > + loggingPrivacyLevel = nw_context_privacy_level_silent; > +#endif Why not protect this with #if HAVE(LOGGING_PRIVACY_LEVEL)/#endif? Created attachment 400637 [details]
Patch
Comment on attachment 400635 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=400635&action=review >> Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h:80 >> +#endif > > Why is this needed separately from HAVE(LOGGING_PRIVACY_LEVEL)? nw_context_privacy_level_silent is new. The other three are existing values. This new #define is available when we build for an Internal SDK, and we need to use it so our builders don't break. >> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1033 >> + auto loggingPrivacyLevel = nw_context_privacy_level_sensitive; > > Need to protect this with #if HAVE(LOGGING_PRIVACY_LEVEL)/#endif. No -- this one is fine. It's an existing value. >> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1041 >> +#endif > > Why not protect this with #if HAVE(LOGGING_PRIVACY_LEVEL)/#endif? This one is the special new case that might not exist depending on which SDK/platform you are building on. So it needs its own define. Comment on attachment 400637 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=400637&action=review r=me if you add the #if HAVE(LOGGING_PRIVACY_LEVEL)/#endif guard. > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1033 > + auto loggingPrivacyLevel = nw_context_privacy_level_sensitive; This still needs #if HAVE(LOGGING_PRIVACY_LEVEL)/#endif guard otherwise it will be an unused variable. It should result in a build failure, except I think we have that warning disabled on the WebKit project. Created attachment 400641 [details]
Patch for landing
Committed r262332: <https://trac.webkit.org/changeset/262332> All reviewed patches have been landed. Closing bug and clearing flags on attachment 400641 [details]. (In reply to EWS from comment #10) > Committed r262332: <https://trac.webkit.org/changeset/262332> Follow-up build fix for Windows: Committed r262347: <https://trac.webkit.org/changeset/262347> |