Bug 218681 - [JSC] Add TimeZone range cache over ICU TimeZone API
Summary: [JSC] Add TimeZone range cache over ICU TimeZone API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on: 219915
Blocks:
  Show dependency treegraph
 
Reported: 2020-11-06 23:17 PST by Yusuke Suzuki
Modified: 2020-12-17 15:47 PST (History)
12 users (show)

See Also:


Attachments
Patch (15.47 KB, patch)
2020-11-06 23:19 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (15.47 KB, patch)
2020-11-06 23:21 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (15.75 KB, patch)
2020-11-07 19:38 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (15.80 KB, patch)
2020-11-07 20:42 PST, Yusuke Suzuki
ross.kirsling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2020-11-06 23:17:07 PST
[JSC] Add TimeZone range cache over ICU TimeZone API
Comment 1 Yusuke Suzuki 2020-11-06 23:19:48 PST
Created attachment 413519 [details]
Patch
Comment 2 Yusuke Suzuki 2020-11-06 23:21:29 PST
Created attachment 413520 [details]
Patch
Comment 3 Yusuke Suzuki 2020-11-07 19:38:39 PST
Created attachment 413538 [details]
Patch
Comment 4 Yusuke Suzuki 2020-11-07 20:42:01 PST
Created attachment 413540 [details]
Patch
Comment 5 Ross Kirsling 2020-11-08 21:16:52 PST
Comment on attachment 413540 [details]
Patch

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

r=me, looks good based on the code that existed prior to r269320.

> Source/JavaScriptCore/runtime/JSDateMath.cpp:104
> +    auto& timeZoneCache = *bitwise_cast<icu::TimeZone*>(this->timeZoneCache());

Is the `this->` necessary?

> Source/JavaScriptCore/runtime/JSDateMath.cpp:151
> +        if (millisecondsFromEpoch <= newEnd) {

nit: You could flip this to be an early out for less nesting if you wanted (ditto below).

> Source/JavaScriptCore/runtime/JSDateMath.cpp:166
> +                // the point in time where the DST offset change occurred. Updated

nit: Updated -> Update (ditto below).
Comment 6 Yusuke Suzuki 2020-11-08 21:25:12 PST
Comment on attachment 413540 [details]
Patch

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

Thanks!

>> Source/JavaScriptCore/runtime/JSDateMath.cpp:104
>> +    auto& timeZoneCache = *bitwise_cast<icu::TimeZone*>(this->timeZoneCache());
> 
> Is the `this->` necessary?

Yes, because `timeZoneCache` name is also used by the variable :)

>> Source/JavaScriptCore/runtime/JSDateMath.cpp:151
>> +        if (millisecondsFromEpoch <= newEnd) {
> 
> nit: You could flip this to be an early out for less nesting if you wanted (ditto below).

Nice. Done

>> Source/JavaScriptCore/runtime/JSDateMath.cpp:166
>> +                // the point in time where the DST offset change occurred. Updated
> 
> nit: Updated -> Update (ditto below).

Nice, fixed.
Comment 7 Yusuke Suzuki 2020-11-08 21:31:40 PST
Committed r269576: <https://trac.webkit.org/changeset/269576>
Comment 8 Radar WebKit Bug Importer 2020-11-08 21:32:21 PST
<rdar://problem/71176359>
Comment 9 WebKit Commit Bot 2020-12-15 13:20:22 PST
Re-opened since this is blocked by bug 219915
Comment 10 Yusuke Suzuki 2020-12-17 15:47:27 PST
The reverted patch is once integrated since we workaround ICU missing API issue differently.