Bug 196268 - Inhibit CFNetwork logging in private sessions
Summary: Inhibit CFNetwork logging in private sessions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-26 13:27 PDT by Keith Rollin
Modified: 2019-04-03 21:16 PDT (History)
10 users (show)

See Also:


Attachments
Patch (3.71 KB, patch)
2019-03-26 13:29 PDT, Keith Rollin
no flags Details | Formatted Diff | Diff
Patch (1.68 KB, patch)
2019-04-01 16:44 PDT, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2019-03-26 13:27:16 PDT
Before performing any logging, the NetworkProcess checks to see if it's performing an operation associated with a private (ephemeral) browsing session. If so, it skips all logging. However, networking layers below the NetworkProcess don't know about private browsing, so they would still perform their own logging. CFNetwork now has a flag that lets us control that, so set it to False if private browsing.
Comment 1 Keith Rollin 2019-03-26 13:27:25 PDT
<rdar://problem/48210793>
Comment 2 Keith Rollin 2019-03-26 13:29:31 PDT
Created attachment 365993 [details]
Patch
Comment 3 WebKit Commit Bot 2019-03-26 16:29:18 PDT
Comment on attachment 365993 [details]
Patch

Clearing flags on attachment: 365993

Committed r243524: <https://trac.webkit.org/changeset/243524>
Comment 4 WebKit Commit Bot 2019-03-26 16:29:20 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Alexey Proskuryakov 2019-03-26 18:12:52 PDT
Comment on attachment 365993 [details]
Patch

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

> Source/WTF/wtf/Platform.h:1529
> +#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 60000) || (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 130000)

It should be PLATFORM(IOS) in the second clause, not IOS_FAMILY.
Comment 6 Keith Rollin 2019-03-26 22:51:09 PDT
Ugh. OK. So when should IOS vs. IOS_FAMILY be used? I was modeling my conditional on the one a few lines above:

#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
#define HAVE_SANDBOX_ISSUE_MACH_EXTENSION_TO_PROCESS_BY_PID 1
#endif
Comment 7 Keith Rollin 2019-04-01 16:40:57 PDT
Re-opened to address Alexey's comment.
Comment 8 Keith Rollin 2019-04-01 16:44:42 PDT
Created attachment 366442 [details]
Patch
Comment 9 WebKit Commit Bot 2019-04-02 10:46:13 PDT
Comment on attachment 366442 [details]
Patch

Clearing flags on attachment: 366442

Committed r243747: <https://trac.webkit.org/changeset/243747>
Comment 10 WebKit Commit Bot 2019-04-02 10:46:14 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Saam Barati 2019-04-03 17:52:25 PDT
(In reply to Keith Rollin from comment #0)
> Before performing any logging, the NetworkProcess checks to see if it's
> performing an operation associated with a private (ephemeral) browsing
> session. If so, it skips all logging. However, networking layers below the
> NetworkProcess don't know about private browsing, so they would still
> perform their own logging. CFNetwork now has a flag that lets us control
> that, so set it to False if private browsing.

Why just in private browsing? I think we should always turn this logging off.
Comment 12 Keith Rollin 2019-04-03 21:16:54 PDT
That logging is priceless in tracking down networking issues. Why do you think it should be removed unconditionally?