Closed Bug 1984126 Opened 1 year ago Closed 1 year ago

Add support to modify Realm time zone

Categories

(Core :: JavaScript Engine, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
144 Branch
Tracking Status
firefox144 --- fixed

People

(Reporter: anba, Assigned: anba)

References

Details

Attachments

(8 files)

No description provided.

Later patches will add new callers to StringToTimeZone.

Using char instead of char16_t simplifies later patches in this patch stack.

Part 8 will move this to JS::RealmBehaviors, if it's necessary to modify
the time zone after Realm creation.

Realms with a time zone override will get their own DateTimeInfo object. All
other Realms will continue using the shared DateTimeInfo::instance object.

RFP will be changed to use this new Realm option, so we no longer need the
DateTimeInfo::instanceUTC object.

Static DateTimeInfo method no longer receive the ForceUTC parameter to select
between default and UTC DateTimeInfo instances. Instead DateTimeInfo* is passed
and when the pointer is non-null, all time zone computations happen using the explicit
DateTimeInfo object.

Realm-specific time zone support is only available when JS_HAS_INTL_API is defined,
because without Intl support we can't support different time zones.

Parts 5-7 will update RFP to use the new Realm creation option and remove RealmCreationOptions::forceUTC.

Update the shell newGlobal function to use the new "timeZone" realm
option and then update RFP tests.

Change RFP to use new time zone Realm creation option added in parts 3-4.

Allow to modify the Realm time zone after creating the Realm.

Pushed by andre.bargull@gmail.com: https://github.com/mozilla-firefox/firefox/commit/8bedb031ccb8 https://hg.mozilla.org/integration/autoland/rev/973a6a18475a Part 1: Add StringToTimeZone testing helper. r=jandem https://github.com/mozilla-firefox/firefox/commit/a8423bf536b5 https://hg.mozilla.org/integration/autoland/rev/027032b187f6 Part 2: Change TimeZone::TryCreate to use char instead of char16_t. r=platform-i18n-reviewers,gregtatum https://github.com/mozilla-firefox/firefox/commit/7e61c4b81f96 https://hg.mozilla.org/integration/autoland/rev/aa47ee241eca Part 3: Add time zone override to RealmCreationOptions. r=jandem https://github.com/mozilla-firefox/firefox/commit/bfdb9431b91c https://hg.mozilla.org/integration/autoland/rev/59e9e082681b Part 4: Replace DateTimeInfo::ForceUTC with optional DateTimeInfo parameter. r=jandem https://github.com/mozilla-firefox/firefox/commit/0a33778eeaaf https://hg.mozilla.org/integration/autoland/rev/44d12cd05998 Part 5: Update tests. r=jandem https://github.com/mozilla-firefox/firefox/commit/17d349357485 https://hg.mozilla.org/integration/autoland/rev/4338515033f9 Part 6: Update RFP to use time zone override. r=tschuster https://github.com/mozilla-firefox/firefox/commit/11638ca27bca https://hg.mozilla.org/integration/autoland/rev/bc1a7f089410 Part 7: Remove no longer used ForceUTC realm creation option. r=jandem https://github.com/mozilla-firefox/firefox/commit/c02b46973246 https://hg.mozilla.org/integration/autoland/rev/5303b23bdb9e Part 8: Allow dynamic time zone changes. r=jandem
Pushed by csabou@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0325735ecfe5 https://hg.mozilla.org/integration/autoland/rev/c0b5a782b956 Revert "Bug 1984126 - Part 8: Allow dynamic time zone changes. r=jandem" for causing jsreftest failures on realm-time-zone.js

Backed out for causing jsreftest failures on realm-time-zone.js

Push with failures

Failure log

Backout link

Flags: needinfo?(andrebargull)
Flags: needinfo?(andrebargull)
Pushed by andre.bargull@gmail.com: https://github.com/mozilla-firefox/firefox/commit/fa204ae25882 https://hg.mozilla.org/integration/autoland/rev/8e0fed1afa91 Part 1: Add StringToTimeZone testing helper. r=jandem https://github.com/mozilla-firefox/firefox/commit/ad1c5c16425f https://hg.mozilla.org/integration/autoland/rev/05cdf3fc02cf Part 2: Change TimeZone::TryCreate to use char instead of char16_t. r=platform-i18n-reviewers,gregtatum https://github.com/mozilla-firefox/firefox/commit/027b9100b2cc https://hg.mozilla.org/integration/autoland/rev/21c75da9e81b Part 3: Add time zone override to RealmCreationOptions. r=jandem https://github.com/mozilla-firefox/firefox/commit/aef89e19f789 https://hg.mozilla.org/integration/autoland/rev/a6383adfb3de Part 4: Replace DateTimeInfo::ForceUTC with optional DateTimeInfo parameter. r=jandem https://github.com/mozilla-firefox/firefox/commit/676592cde812 https://hg.mozilla.org/integration/autoland/rev/0193199e5ffd Part 5: Update tests. r=jandem https://github.com/mozilla-firefox/firefox/commit/d11e04f5eb4f https://hg.mozilla.org/integration/autoland/rev/f5c356b02b77 Part 6: Update RFP to use time zone override. r=tschuster https://github.com/mozilla-firefox/firefox/commit/b47a99ce8248 https://hg.mozilla.org/integration/autoland/rev/eb25fa03633b Part 7: Remove no longer used ForceUTC realm creation option. r=jandem https://github.com/mozilla-firefox/firefox/commit/1f939ae25fbc https://hg.mozilla.org/integration/autoland/rev/af8869569063 Part 8: Allow dynamic time zone changes. r=jandem
QA Whiteboard: [qa-triage-done-c145/b144]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: