[webkit-reviews] review granted: [Bug 239865] Format time zone name using ICU instead of platform calls : [Attachment 458543] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 28 13:25:57 PDT 2022


Yusuke Suzuki <ysuzuki at apple.com> has granted Yury Semikhatsky
<yurys at chromium.org>'s request for review:
Bug 239865: Format time zone name using ICU instead of platform calls
https://bugs.webkit.org/show_bug.cgi?id=239865

Attachment 458543: Patch

https://bugs.webkit.org/attachment.cgi?id=458543&action=review




--- Comment #5 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 458543
  --> https://bugs.webkit.org/attachment.cgi?id=458543
Patch

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

Looks good to me.
Can you add a JSTests/stress/xxx.js test which exercise this change in JS?

> Source/JavaScriptCore/runtime/JSDateMath.cpp:376
> +	       auto status =
callBufferProducingFunction(ucal_getTimeZoneDisplayName,
timeZoneCache.m_calendar.get(), UCAL_STANDARD, language.utf8().data(),
standardDisplayNameBuffer);

Let's generate language.utf8() once, and use for both. We do not need to
allocate it twice.


More information about the webkit-reviews mailing list