Commit f37398bc authored by Frank Tang's avatar Frank Tang Committed by Commit Bot

Fix UBSan breakage due to pointer/ref issue

Bug: v8:9241
Change-Id: I0e2b73e3f98b1863e790a7d28a716fe9e3478103
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1610437Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61455}
parent c7b9fd25
...@@ -728,7 +728,9 @@ Maybe<icu::UnicodeString> IcuFormatNumber( ...@@ -728,7 +728,9 @@ Maybe<icu::UnicodeString> IcuFormatNumber(
double number = numeric_obj->Number(); double number = numeric_obj->Number();
formatted = number_format.formatDouble(number, status); formatted = number_format.formatDouble(number, status);
} }
formatted.getAllFieldPositions(*fp_iter, status); if (fp_iter) {
formatted.getAllFieldPositions(*fp_iter, status);
}
icu::UnicodeString result = formatted.toString(status); icu::UnicodeString result = formatted.toString(status);
if (U_FAILURE(status)) { if (U_FAILURE(status)) {
THROW_NEW_ERROR_RETURN_VALUE(isolate, THROW_NEW_ERROR_RETURN_VALUE(isolate,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment