Verified Commit 516c0254 authored by Makoto Kato's avatar Makoto Kato Committed by ma1
Browse files

Bug 2027336 - Always call forget. a=dmeehan

parent a602ed6a
Loading
Loading
Loading
Loading
+3 −3
Changes for intl/components/src/RelativeTimeFormat.cpp: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -57,13 +57,13 @@ RelativeTimeFormat::TryCreate(const char* aLocale,
      ureldatefmt_open(IcuLocale(aLocale), nf, relDateTimeStyle,
                       UDISPCTX_CAPITALIZATION_FOR_STANDALONE, &status);

  // Ownership was transferred to mFormatter.
  closeNumberFormatter.forget();

  if (U_FAILURE(status)) {
    return Err(ToICUError(status));
  }

  // Ownership was transferred to mFormatter.
  closeNumberFormatter.forget();

  UniquePtr<RelativeTimeFormat> rtf = MakeUnique<RelativeTimeFormat>(
      aOptions.numeric, formatter, formattedRelativeDateTime);