Bug 175271 - Resource Load Statistics: Clear web processes' state on history removal
Summary: Resource Load Statistics: Clear web processes' state on history removal
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: John Wilander
URL:
Keywords: InRadar
: 175266 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-08-07 11:01 PDT by John Wilander
Modified: 2017-08-08 10:18 PDT (History)
5 users (show)

See Also:


Attachments
Patch (22.38 KB, patch)
2017-08-07 13:55 PDT, John Wilander
no flags Details | Formatted Diff | Diff
Patch for landing (22.15 KB, patch)
2017-08-07 17:01 PDT, John Wilander
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Wilander 2017-08-07 11:01:20 PDT
https://bugs.webkit.org/show_bug.cgi?id=175090 introduced state in the web process and that state needs to be cleared when the UI process' statistics are cleared as part of history removal.
Comment 1 Radar WebKit Bug Importer 2017-08-07 11:02:09 PDT
<rdar://problem/33756560>
Comment 2 John Wilander 2017-08-07 12:16:02 PDT
*** Bug 175266 has been marked as a duplicate of this bug. ***
Comment 3 John Wilander 2017-08-07 13:55:31 PDT
Created attachment 317459 [details]
Patch
Comment 4 Chris Dumez 2017-08-07 14:36:26 PDT
Comment on attachment 317459 [details]
Patch

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

> Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm:379
> +        WTFLogAlways("ResourceLoadLog | About to call m_currentInvocation->didClearStatisticsThroughWebsiteDataRemoval().");

Should probably be removed.

> LayoutTests/http/tests/loading/resourceLoadStatistics/user-interaction-reported-after-website-data-removal.html:39
> +            testRunner.setStatisticsHasHadUserInteraction(topFrameOrigin, false);

Why is this here? Shouldn't clearing the data clear the user interaction too?
Comment 5 John Wilander 2017-08-07 16:22:56 PDT
(In reply to Chris Dumez from comment #4)
> Comment on attachment 317459 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=317459&action=review
> 
> > Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm:379
> > +        WTFLogAlways("ResourceLoadLog | About to call m_currentInvocation->didClearStatisticsThroughWebsiteDataRemoval().");
> 
> Should probably be removed.

Oops. Sure!

> > LayoutTests/http/tests/loading/resourceLoadStatistics/user-interaction-reported-after-website-data-removal.html:39
> > +            testRunner.setStatisticsHasHadUserInteraction(topFrameOrigin, false);
> 
> Why is this here? Shouldn't clearing the data clear the user interaction too?

True. I can remove it.

Rest is good?
Comment 6 Chris Dumez 2017-08-07 16:52:56 PDT
Comment on attachment 317459 [details]
Patch

r=me if the test still passes after you drop the extra testRunner.setStatisticsHasHadUserInteraction() call.
Comment 7 John Wilander 2017-08-07 16:59:09 PDT
(In reply to Chris Dumez from comment #6)
> Comment on attachment 317459 [details]
> Patch
> 
> r=me if the test still passes after you drop the extra
> testRunner.setStatisticsHasHadUserInteraction() call.

It does. Thanks!
Comment 8 John Wilander 2017-08-07 17:01:43 PDT
Created attachment 317513 [details]
Patch for landing
Comment 9 WebKit Commit Bot 2017-08-08 10:18:27 PDT
Comment on attachment 317513 [details]
Patch for landing

Clearing flags on attachment: 317513

Committed r220412: <http://trac.webkit.org/changeset/220412>
Comment 10 WebKit Commit Bot 2017-08-08 10:18:29 PDT
All reviewed patches have been landed.  Closing bug.