Bug 143316 - Use std::chrono types to represent time in response and cache classes
Summary: Use std::chrono types to represent time in response and cache classes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-01 13:41 PDT by Antti Koivisto
Modified: 2015-04-03 10:34 PDT (History)
5 users (show)

See Also:


Attachments
patch (40.12 KB, patch)
2015-04-01 14:53 PDT, Antti Koivisto
kling: review+
Details | Formatted Diff | Diff
non-llvm build fixes (40.18 KB, patch)
2015-04-02 05:13 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
another (40.18 KB, patch)
2015-04-02 05:32 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
another (40.20 KB, patch)
2015-04-02 06:20 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
another (40.27 KB, patch)
2015-04-02 07:25 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
another (41.61 KB, patch)
2015-04-02 08:07 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2015-04-01 13:41:14 PDT
Modernize.
Comment 1 Antti Koivisto 2015-04-01 14:53:37 PDT
Created attachment 249943 [details]
patch
Comment 2 Andreas Kling 2015-04-01 14:59:19 PDT
Comment on attachment 249943 [details]
patch

r=me
Comment 3 Antti Koivisto 2015-04-02 05:13:39 PDT
Created attachment 249970 [details]
non-llvm build fixes
Comment 4 Antti Koivisto 2015-04-02 05:32:22 PDT
Created attachment 249972 [details]
another
Comment 5 Antti Koivisto 2015-04-02 06:20:18 PDT
Created attachment 249975 [details]
another
Comment 6 Antti Koivisto 2015-04-02 07:25:10 PDT
Created attachment 249977 [details]
another
Comment 7 Antti Koivisto 2015-04-02 08:07:59 PDT
Created attachment 249979 [details]
another
Comment 8 Antti Koivisto 2015-04-02 08:47:43 PDT
https://trac.webkit.org/r182271
Comment 9 Brent Fulgham 2015-04-02 10:07:14 PDT
This broke four JSC tests on Windows:

** The following JSC stress test failures have been introduced:
	mozilla-tests.yaml/ecma/Date/15.9.5.8.js.mozilla
	mozilla-tests.yaml/ecma/Date/15.9.5.8.js.mozilla-baseline
	mozilla-tests.yaml/ecma/Date/15.9.5.8.js.mozilla-dfg-eager-no-cjit-validate-phases
	mozilla-tests.yaml/ecma/Date/15.9.5.8.js.mozilla-llint

Can you fix, or should I roll this out?
Comment 10 Antti Koivisto 2015-04-02 11:21:09 PDT
I don't understand how. This patch didn't touch anything on JSC level or below.
Comment 11 Brent Fulgham 2015-04-02 11:27:40 PDT
(In reply to comment #10)
> I don't understand how. This patch didn't touch anything on JSC level or
> below.

It might just be the bot. I'm noticing that one of the two bots is green, while the other is failing.
Comment 12 Antti Koivisto 2015-04-02 11:30:56 PDT
This patch touched WebCore, WebKit and WebKit2 only. Literally no code affected here should end up in jsc.exe.
Comment 13 Anders Carlsson 2015-04-03 10:34:05 PDT
Comment on attachment 249979 [details]
another

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

> Source/WebCore/platform/network/CacheValidation.cpp:113
> +    auto maxAge = response.cacheControlMaxAge();
> +    if (maxAge)

Can fold this into the if condition.

> Source/WebCore/platform/network/HTTPParsers.cpp:243
> +    // This assumes system_clock epoch equals Unix epoch which is true for all implementations but unspecified.
> +    // FIXME: The parsing function should be switched to std::chrono too.

Maybe we can use std::chrono::system:clock::to_time_t or something?