WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
174038
Move store logic from WebResourceLoadStatisticsManager to WebResourceLoadStatisticsStore
https://bugs.webkit.org/show_bug.cgi?id=174038
Summary
Move store logic from WebResourceLoadStatisticsManager to WebResourceLoadStat...
Chris Dumez
Reported
2017-06-30 14:02:10 PDT
Move store logic from WebResourceLoadStatisticsManager to WebResourceLoadStatisticsStore. WebResourceLoadStatisticsManager will essentially become a WK C API proxy for the WebResourceLoadStatisticsStore. In a follow-up, the idea is to make WebResourceLoadStatisticsManager not be a singleton and instead be an APIObject for the WebResourceLoadStatisticsStore. This will require replacing the C API currently used by WKTR with a Cocoa API that works on a WebResourceLoadStatisticsStore, rather than require a singleton.
Attachments
WIP Patch
(52.25 KB, patch)
2017-06-30 14:08 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(55.77 KB, patch)
2017-06-30 14:28 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(56.28 KB, patch)
2017-06-30 14:46 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(64.56 KB, patch)
2017-06-30 15:41 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2017-06-30 14:08:22 PDT
Created
attachment 314285
[details]
WIP Patch
Chris Dumez
Comment 2
2017-06-30 14:28:39 PDT
Created
attachment 314290
[details]
Patch
Brent Fulgham
Comment 3
2017-06-30 14:32:04 PDT
Comment on
attachment 314290
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=314290&action=review
> Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp:548 > + // FIXME: Why is this potentially creating a store entry just for querying?
This looks wrong. I can't find any place that relies on this query having the side-effect of creating a new entry. I suspect this was just a matter of copy/paste as these test routines were added.
> Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp:569 > + // FIXME: Why is this potentially creating a store entry just for querying?
Ditto. We should just return 'false' if the entry doesn't exist. These methods should probably be 'const', too.
Brent Fulgham
Comment 4
2017-06-30 14:32:41 PDT
/home/ews/ltilve-gtk-wk2-ews/WebKit/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:1087:35: error: 'class WebKit::WebResourceLoadStatisticsStore' has no member named 'clearInMemoryAndPersistentStore'; did you mean 'clearInMemoryAndPersistent'?
Chris Dumez
Comment 5
2017-06-30 14:33:28 PDT
(In reply to Brent Fulgham from
comment #3
)
> Comment on
attachment 314290
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=314290&action=review
> > > Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp:548 > > + // FIXME: Why is this potentially creating a store entry just for querying? > > This looks wrong. I can't find any place that relies on this query having > the side-effect of creating a new entry. I suspect this was just a matter of > copy/paste as these test routines were added. > > > Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp:569 > > + // FIXME: Why is this potentially creating a store entry just for querying? > > Ditto. We should just return 'false' if the entry doesn't exist. These > methods should probably be 'const', too.
I suspect this is wrong indeed. However, I am trying hard not to change behavior in big refactoring patches :) I can take care of this in a follow-up.
Brent Fulgham
Comment 6
2017-06-30 14:33:48 PDT
Comment on
attachment 314290
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=314290&action=review
> Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:818 > + m_resourceLoadStatistics->clearInMemoryAndPersistentStore(modifiedSince);
Should this be 'clearInMemoryAndPersistent'?
> Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:1087 > + m_resourceLoadStatistics->clearInMemoryAndPersistentStore();
Ditto.
Chris Dumez
Comment 7
2017-06-30 14:34:04 PDT
(In reply to Brent Fulgham from
comment #4
)
> /home/ews/ltilve-gtk-wk2-ews/WebKit/Source/WebKit2/UIProcess/WebsiteData/ > WebsiteDataStore.cpp:1087:35: error: 'class > WebKit::WebResourceLoadStatisticsStore' has no member named > 'clearInMemoryAndPersistentStore'; did you mean 'clearInMemoryAndPersistent'?
Yea yea, I am still building locally :P which is why there is no r? flag.
Chris Dumez
Comment 8
2017-06-30 14:46:07 PDT
Created
attachment 314295
[details]
Patch
Brent Fulgham
Comment 9
2017-06-30 14:49:04 PDT
Comment on
attachment 314295
[details]
Patch r=me
Chris Dumez
Comment 10
2017-06-30 15:25:38 PDT
Darn, it looks like I broke something: Regressions: Unexpected timeouts (2) http/tests/loading/resourceLoadStatistics/non-prevalent-resource-without-user-interaction.html [ Timeout ] http/tests/loading/resourceLoadStatistics/prevalent-resource-with-user-interaction.html [ Timeout ] Must have made a copy/paste error somewhere.
Chris Dumez
Comment 11
2017-06-30 15:36:35 PDT
Comment on
attachment 314295
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=314295&action=review
> Tools/WebKitTestRunner/InjectedBundle/TestRunner.h:374 > + void setStatisticsMinimumTimeBetweenDataRecordsRemoval(double);
Ah... the tests use setStatisticsMinimumTimeBetweeenDataRecordsRemoval with 3 'e's :)
Chris Dumez
Comment 12
2017-06-30 15:41:16 PDT
Created
attachment 314307
[details]
Patch
WebKit Commit Bot
Comment 13
2017-06-30 16:23:02 PDT
Comment on
attachment 314307
[details]
Patch Clearing flags on attachment: 314307 Committed
r219025
: <
http://trac.webkit.org/changeset/219025
>
WebKit Commit Bot
Comment 14
2017-06-30 16:23:04 PDT
All reviewed patches have been landed. Closing bug.
Csaba Osztrogonác
Comment 15
2017-06-30 22:47:58 PDT
(In reply to WebKit Commit Bot from
comment #13
)
> Comment on
attachment 314307
[details]
> Patch > > Clearing flags on attachment: 314307 > > Committed
r219025
: <
http://trac.webkit.org/changeset/219025
>
It broke the Apple Mac cmake build
https://build.webkit.org/builders/Apple%20El%20Capitan%20CMake%20Debug%20%28Build%29/builds/3035
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug