Bug 201821

Summary: Simplify WebResourceLoadObserver now that we have one WebProcess per session
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, commit-queue, dbates, ews-watchlist, ggaren, japhet, katherine_cheney, toyoshim, webkit-bug-importer, wilander, youennf, yutak
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=198923
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Chris Dumez
Reported 2019-09-16 09:18:38 PDT
Simplify WebResourceLoadObserver now that we have one WebProcess per session.
Attachments
Patch (30.04 KB, patch)
2019-09-16 09:27 PDT, Chris Dumez
no flags
Patch (30.65 KB, patch)
2019-09-16 11:02 PDT, Chris Dumez
no flags
Patch (30.65 KB, patch)
2019-09-16 11:03 PDT, Chris Dumez
no flags
Patch (33.50 KB, patch)
2019-09-16 12:53 PDT, Chris Dumez
no flags
Patch (33.32 KB, patch)
2019-09-16 13:07 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2019-09-16 09:27:11 PDT
Brent Fulgham
Comment 2 2019-09-16 09:41:16 PDT
WinCairo failure appears to be a bot problem, unrelated to this patch.
Brent Fulgham
Comment 3 2019-09-16 09:46:22 PDT
Comment on attachment 378865 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=378865&action=review > Source/WebKit/ChangeLog:9 > + No need to pass sessionIDs around or stores statistics per sessionID. "or store" > Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:-214 > - return; Do we really not need this anymore? Even if we don't need to pass sessionID to the rest of the ITP system, surely preventing passing of observations when we should don't log for the current network session seems like a good idea? > Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:-238 > - return; Ditto. > Source/WebKit/WebProcess/WebProcess.cpp:456 > + if (parameters.resourceLoadStatisticsEnabled && !parameters.sessionID.isEphemeral()) While we don't log ITP data for ephemeral systems right now, we do want to apply these protections in the future. But I guess this is fine for now.
Chris Dumez
Comment 4 2019-09-16 09:56:01 PDT
Comment on attachment 378865 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=378865&action=review >> Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:-214 >> - return; > > Do we really not need this anymore? Even if we don't need to pass sessionID to the rest of the ITP system, surely preventing passing of observations when we should don't log for the current network session seems like a good idea? If you look at WebProcess.cpp, you'll see that I do not even initialize the WebResourceLoadObserver if ITP is disabled or the sessionID is ephemeral. Actually, I should probably drop the shouldLogResourceLoadStatistics() method entirely, looks like I forgot.
Chris Dumez
Comment 5 2019-09-16 09:58:34 PDT
(In reply to Chris Dumez from comment #4) > Comment on attachment 378865 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=378865&action=review > > >> Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:-214 > >> - return; > > > > Do we really not need this anymore? Even if we don't need to pass sessionID to the rest of the ITP system, surely preventing passing of observations when we should don't log for the current network session seems like a good idea? > > If you look at WebProcess.cpp, you'll see that I do not even initialize the > WebResourceLoadObserver if ITP is disabled or the sessionID is ephemeral. > > Actually, I should probably drop the shouldLogResourceLoadStatistics() > method entirely, looks like I forgot. The ITP system already has the sessionID without the WebContent process sending it to it since the NetworkConnectionToWebProcess knows the sessionID.
Chris Dumez
Comment 6 2019-09-16 09:59:09 PDT
Comment on attachment 378865 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=378865&action=review > Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:696 > + if (auto* networkSession = this->networkSession()) { See here, it is getting the networkSession for the sessionID of the WebProcess (See implementation of networkSession()).
Brent Fulgham
Comment 7 2019-09-16 10:04:32 PDT
Comment on attachment 378865 [details] Patch Looks good. r=me.
Chris Dumez
Comment 8 2019-09-16 11:02:18 PDT
Chris Dumez
Comment 9 2019-09-16 11:03:50 PDT
Chris Dumez
Comment 10 2019-09-16 12:53:40 PDT
Chris Dumez
Comment 11 2019-09-16 13:07:00 PDT
WebKit Commit Bot
Comment 12 2019-09-16 14:21:36 PDT
Comment on attachment 378886 [details] Patch Clearing flags on attachment: 378886 Committed r249920: <https://trac.webkit.org/changeset/249920>
WebKit Commit Bot
Comment 13 2019-09-16 14:21:38 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 14 2019-09-16 14:22:18 PDT
Note You need to log in before you can comment on or make changes to this bug.