[webkit-reviews] review granted: [Bug 213324] [Intl] Enable RelativeTimeFormat and Locale by default : [Attachment 402184] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 18 09:45:40 PDT 2020


Yusuke Suzuki <ysuzuki at apple.com> has granted Ross Kirsling
<ross.kirsling at sony.com>'s request for review:
Bug 213324: [Intl] Enable RelativeTimeFormat and Locale by default
https://bugs.webkit.org/show_bug.cgi?id=213324

Attachment 402184: Patch

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




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

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

r=me with one comment.

> Source/JavaScriptCore/runtime/IntlRelativeTimeFormat.cpp:155
> +    m_relativeDateTimeFormatter =
std::unique_ptr<URelativeDateTimeFormatter,
URelativeDateTimeFormatterDeleter>(ureldatefmt_open(dataLocaleWithExtensions.da
ta(), m_rawNumberFormat, m_style, UDISPCTX_CAPITALIZATION_FOR_STANDALONE,
&status));
>      if (UNLIKELY(U_FAILURE(status))) {
>	   throwTypeError(globalObject, scope, "failed to initialize
RelativeTimeFormat"_s);
>	   return;

I think we could leak m_rawNumberFormat if opening m_relativeDateTimeFormatter
failed here.


More information about the webkit-reviews mailing list