From d08f468cf8c07275b184a23da8674fe5f08e7d89 Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Mon, 19 Dec 2016 16:22:06 -0500 Subject: [PATCH] Bug 1289882 - Fix bustage. r=bustage in a CLOSED TREE --- js/src/builtin/Intl.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/js/src/builtin/Intl.cpp b/js/src/builtin/Intl.cpp index 624285092022..93646f496590 100644 --- a/js/src/builtin/Intl.cpp +++ b/js/src/builtin/Intl.cpp @@ -674,15 +674,15 @@ udat_close(UDateFormat* format) MOZ_CRASH("udat_close: Intl API disabled"); } -} // anonymous namespace - -static int32_t +int32_t udat_getSymbols(const UDateFormat *fmt, UDateFormatSymbolType type, int32_t symbolIndex, UChar *result, int32_t resultLength, UErrorCode *status) { MOZ_CRASH("udat_getSymbols: Intl API disabled"); } +} // anonymous namespace + #endif @@ -1835,6 +1835,8 @@ intl_FormatNumber(JSContext* cx, UNumberFormat* nf, double x, MutableHandleValue using FieldType = ImmutablePropertyNamePtr JSAtomState::*; +#if defined(ICU_UNUM_HAS_FORMATDOUBLEFORFIELDS) + static FieldType GetFieldTypeForNumberField(UNumberFormatFields fieldName, double d) { @@ -1880,6 +1882,7 @@ GetFieldTypeForNumberField(UNumberFormatFields fieldName, double d) MOZ_ASSERT_UNREACHABLE("unexpected permill field found, even though " "we don't use any user-defined patterns that " "would require a permill field"); + break; case UNUM_EXPONENT_SYMBOL_FIELD: case UNUM_EXPONENT_SIGN_FIELD: @@ -1887,10 +1890,12 @@ GetFieldTypeForNumberField(UNumberFormatFields fieldName, double d) MOZ_ASSERT_UNREACHABLE("exponent field unexpectedly found in " "formatted number, even though UNUM_SCIENTIFIC " "and scientific notation were never requested"); + break; case UNUM_FIELD_COUNT: MOZ_ASSERT_UNREACHABLE("format field sentinel value returned by " "iterator!"); + break; } MOZ_ASSERT_UNREACHABLE("unenumerated, undocumented format field returned " @@ -1898,8 +1903,6 @@ GetFieldTypeForNumberField(UNumberFormatFields fieldName, double d) return nullptr; } -#if defined(ICU_UNUM_HAS_FORMATDOUBLEFORFIELDS) - static bool intl_FormatNumberToParts(JSContext* cx, UNumberFormat* nf, double x, MutableHandleValue result) {