WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
171295
Resource Load Statistics: Introduce shorter time-to-live for cookie partition whitelisting
https://bugs.webkit.org/show_bug.cgi?id=171295
Summary
Resource Load Statistics: Introduce shorter time-to-live for cookie partition...
John Wilander
Reported
2017-04-25 16:01:58 PDT
Introduce shorter time-to-live for cookie partition whitelisting.
Attachments
Patch
(44.17 KB, patch)
2017-04-25 16:24 PDT
,
John Wilander
no flags
Details
Formatted Diff
Diff
Patch for landing
(44.36 KB, patch)
2017-04-25 17:50 PDT
,
John Wilander
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-04-25 16:07:29 PDT
<
rdar://problem/31823818
>
John Wilander
Comment 2
2017-04-25 16:24:40 PDT
Created
attachment 308162
[details]
Patch
Brent Fulgham
Comment 3
2017-04-25 17:30:04 PDT
Comment on
attachment 308162
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=308162&action=review
Looks good. Please double-check the mix of doubles and integer math is doing what you expect, and consider using a method to hide the complexity of that one predicate. Otherwise r=me.
> Source/WebCore/loader/ResourceLoadObserver.cpp:52 > +static auto timestampResolution = 3600;
I think this gives an integer value...
> Source/WebCore/loader/ResourceLoadObserver.cpp:306 > return std::floor(seconds / timestampResolution) * timestampResolution;
... so doesn't this do integer division? Maybe the floor doesn't do anything here?
> Source/WebCore/loader/ResourceLoadStatisticsStore.cpp:192 > + || currentTime() > resourceStatistic.mostRecentUserInteraction + timeToLiveCookiePartitionFree);
I think this would read a little more cleanly as a local static method: static bool shouldPartitionCookie(...)
John Wilander
Comment 4
2017-04-25 17:50:24 PDT
Created
attachment 308177
[details]
Patch for landing
John Wilander
Comment 5
2017-04-25 17:53:31 PDT
(In reply to Brent Fulgham from
comment #3
)
> Comment on
attachment 308162
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=308162&action=review
> > Looks good. Please double-check the mix of doubles and integer math is doing > what you expect, and consider using a method to hide the complexity of that > one predicate. Otherwise r=me. > > > Source/WebCore/loader/ResourceLoadObserver.cpp:52 > > +static auto timestampResolution = 3600; > > I think this gives an integer value... > > > Source/WebCore/loader/ResourceLoadObserver.cpp:306 > > return std::floor(seconds / timestampResolution) * timestampResolution; > > ... so doesn't this do integer division? Maybe the floor doesn't do anything > here?
I tested it and the call to floor() does make a difference: Without floor 1493167842.243571 With floor 1493164800.000000
> > Source/WebCore/loader/ResourceLoadStatisticsStore.cpp:192 > > + || currentTime() > resourceStatistic.mostRecentUserInteraction + timeToLiveCookiePartitionFree); > > I think this would read a little more cleanly as a local static method: > > static bool shouldPartitionCookie(...)
Agreed and fixed. Thanks for the review, Brent!
WebKit Commit Bot
Comment 6
2017-04-25 18:22:59 PDT
Comment on
attachment 308177
[details]
Patch for landing Clearing flags on attachment: 308177 Committed
r215782
: <
http://trac.webkit.org/changeset/215782
>
WebKit Commit Bot
Comment 7
2017-04-25 18:23:01 PDT
All reviewed patches have been landed. Closing bug.
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