Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1566af375f800fe2a4842a10e966d8072d678c8b
      
https://github.com/WebKit/WebKit/commit/1566af375f800fe2a4842a10e966d8072d678c8b
  Author: Sosuke Suzuki <[email protected]>
  Date:   2026-03-01 (Sun, 01 Mar 2026)

  Changed paths:
    M Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
    M Source/JavaScriptCore/runtime/IntlObject.cpp

  Log Message:
  -----------
  [JSC] Use `std::unique_ptr` for ICU resources in Intl to fix `UEnumeration` 
leak
https://bugs.webkit.org/show_bug.cgi?id=308919

Reviewed by Yusuke Suzuki.

availableNamedTimeZoneIdentifier() leaks a UEnumeration on every call
with a valid timezone name, because the early return on match skips
uenum_close(). Measured leak is ~210 bytes per Intl.DateTimeFormat
creation with a named timeZone.

Also convert the other raw ICU pointers in these files to
std::unique_ptr with ICUDeleter for consistency. They were not leaking,
but the same file already uses std::unique_ptr for the same ICU APIs
elsewhere.

* Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp:
(JSC::availableNamedTimeZoneIdentifier):
(JSC::IntlDateTimeFormat::localeData):
* Source/JavaScriptCore/runtime/IntlObject.cpp:
(JSC::numberingSystemsForLocale):

Canonical link: https://commits.webkit.org/308423@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to