Changeset 230286 in webkit
- Timestamp:
- Apr 4, 2018 5:22:09 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r230279 r230286 1 2018-04-04 Brian Burg <bburg@apple.com> 2 3 [Cocoa] WebDriver: test imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_non_session_cookie fails 4 https://bugs.webkit.org/show_bug.cgi?id=184314 5 <rdar://problem/39186578> 6 7 Reviewed by Timothy Hatcher. 8 9 Covered by several tests in add_cookie.py per the bug title. 10 11 * platform/network/cocoa/CookieCocoa.mm: 12 (WebCore::Cookie::operator NSHTTPCookie * const): 13 By converting an integral UNIX timestamp to |maxAge| fractional seconds into the future, we introduce unwanted 14 precision that is truncated when switching back to a UNIX timestamp later. Always round up maxAge so that 15 the truncated value and actual value are the same. 16 1 17 2018-04-04 Alex Christensen <achristensen@webkit.org> 2 18 -
trunk/Source/WebCore/platform/network/cocoa/CookieCocoa.mm
r226226 r230286 106 106 107 107 NSDate *expirationDate = [NSDate dateWithTimeIntervalSince1970:expires / 1000.0]; 108 auto maxAge = [expirationDate timeIntervalSinceNow];108 auto maxAge = ceil([expirationDate timeIntervalSinceNow]); 109 109 if (maxAge > 0) 110 110 [properties setObject:[NSString stringWithFormat:@"%f", maxAge] forKey:NSHTTPCookieMaximumAge];
Note: See TracChangeset
for help on using the changeset viewer.