Diff
Modified: trunk/JSTests/ChangeLog (281788 => 281789)
--- trunk/JSTests/ChangeLog 2021-08-31 01:56:19 UTC (rev 281788)
+++ trunk/JSTests/ChangeLog 2021-08-31 02:57:43 UTC (rev 281789)
@@ -1,3 +1,12 @@
+2021-08-30 Ross Kirsling <ross.kirsl...@sony.com>
+
+ [JSC][Intl] Errors for .call({}) are too verbose
+ https://bugs.webkit.org/show_bug.cgi?id=229694
+
+ Reviewed by Yusuke Suzuki.
+
+ * stress/intl-displaynames.js:
+
2021-08-30 Yusuke Suzuki <ysuz...@apple.com>
[JSC] Implement Temporal.Calendar
Modified: trunk/JSTests/stress/intl-displaynames.js (281788 => 281789)
--- trunk/JSTests/stress/intl-displaynames.js 2021-08-31 01:56:19 UTC (rev 281788)
+++ trunk/JSTests/stress/intl-displaynames.js 2021-08-31 02:57:43 UTC (rev 281789)
@@ -195,9 +195,9 @@
shouldThrow(() => {
Intl.DisplayNames.prototype.of.call({});
- }, `TypeError: Intl.DisplayNames.prototype.of called on value that's not an object initialized as a DisplayNames`);
+ }, `TypeError: Intl.DisplayNames.prototype.of called on value that's not a DisplayNames`);
shouldThrow(() => {
Intl.DisplayNames.prototype.resolvedOptions.call({});
- }, `TypeError: Intl.DisplayNames.prototype.resolvedOptions called on value that's not an object initialized as a DisplayNames`);
+ }, `TypeError: Intl.DisplayNames.prototype.resolvedOptions called on value that's not a DisplayNames`);
}
Modified: trunk/Source/_javascript_Core/ChangeLog (281788 => 281789)
--- trunk/Source/_javascript_Core/ChangeLog 2021-08-31 01:56:19 UTC (rev 281788)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-08-31 02:57:43 UTC (rev 281789)
@@ -1,3 +1,22 @@
+2021-08-30 Ross Kirsling <ross.kirsl...@sony.com>
+
+ [JSC][Intl] Errors for .call({}) are too verbose
+ https://bugs.webkit.org/show_bug.cgi?id=229694
+
+ Reviewed by Yusuke Suzuki.
+
+ * runtime/IntlCollatorPrototype.cpp:
+ * runtime/IntlDateTimeFormatPrototype.cpp:
+ * runtime/IntlDisplayNamesPrototype.cpp:
+ * runtime/IntlListFormatPrototype.cpp:
+ * runtime/IntlLocalePrototype.cpp:
+ * runtime/IntlNumberFormatPrototype.cpp:
+ * runtime/IntlPluralRulesPrototype.cpp:
+ * runtime/IntlRelativeTimeFormatPrototype.cpp:
+ * runtime/IntlSegmentIteratorPrototype.cpp:
+ * runtime/IntlSegmenterPrototype.cpp:
+ * runtime/IntlSegmentsPrototype.cpp:
+
2021-08-30 Yusuke Suzuki <ysuz...@apple.com>
[JSC] Implement Temporal.Calendar
Modified: trunk/Source/_javascript_Core/runtime/IntlCollatorPrototype.cpp (281788 => 281789)
--- trunk/Source/_javascript_Core/runtime/IntlCollatorPrototype.cpp 2021-08-31 01:56:19 UTC (rev 281788)
+++ trunk/Source/_javascript_Core/runtime/IntlCollatorPrototype.cpp 2021-08-31 02:57:43 UTC (rev 281789)
@@ -114,7 +114,7 @@
// 1. Let collator be this Collator object.
IntlCollator* collator = jsDynamicCast<IntlCollator*>(vm, JSValue::decode(thisValue));
if (!collator)
- return JSValue::encode(throwTypeError(globalObject, scope, "Intl.Collator.prototype.compare called on value that's not an object initialized as a Collator"_s));
+ return JSValue::encode(throwTypeError(globalObject, scope, "Intl.Collator.prototype.compare called on value that's not a Collator"_s));
JSBoundFunction* boundCompare = collator->boundCompare();
// 2. If collator.[[boundCompare]] is undefined,
@@ -142,7 +142,7 @@
// 10.3.5 Intl.Collator.prototype.resolvedOptions() (ECMA-402 2.0)
IntlCollator* collator = jsDynamicCast<IntlCollator*>(vm, callFrame->thisValue());
if (!collator)
- return JSValue::encode(throwTypeError(globalObject, scope, "Intl.Collator.prototype.resolvedOptions called on value that's not an object initialized as a Collator"_s));
+ return JSValue::encode(throwTypeError(globalObject, scope, "Intl.Collator.prototype.resolvedOptions called on value that's not a Collator"_s));
RELEASE_AND_RETURN(scope, JSValue::encode(collator->resolvedOptions(globalObject)));
}
Modified: trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatPrototype.cpp (281788 => 281789)
--- trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatPrototype.cpp 2021-08-31 01:56:19 UTC (rev 281788)
+++ trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatPrototype.cpp 2021-08-31 02:57:43 UTC (rev 281789)
@@ -123,7 +123,7 @@
RETURN_IF_EXCEPTION(scope, { });
// 2. ReturnIfAbrupt(dtf).
if (UNLIKELY(!dtf))
- return JSValue::encode(throwTypeError(globalObject, scope, "Intl.DateTimeFormat.prototype.format called on value that's not an object initialized as a DateTimeFormat"_s));
+ return JSValue::encode(throwTypeError(globalObject, scope, "Intl.DateTimeFormat.prototype.format called on value that's not a DateTimeFormat"_s));
JSBoundFunction* boundFormat = dtf->boundFormat();
// 3. If the [[boundFormat]] internal slot of this DateTimeFormat object is undefined,
@@ -153,7 +153,7 @@
// Do not use unwrapForOldFunctions.
auto* dateTimeFormat = jsDynamicCast<IntlDateTimeFormat*>(vm, callFrame->thisValue());
if (UNLIKELY(!dateTimeFormat))
- return JSValue::encode(throwTypeError(globalObject, scope, "Intl.DateTimeFormat.prototype.formatToParts called on value that's not an object initialized as a DateTimeFormat"_s));
+ return JSValue::encode(throwTypeError(globalObject, scope, "Intl.DateTimeFormat.prototype.formatToParts called on value that's not a DateTimeFormat"_s));
JSValue date = callFrame->argument(0);
double value;
@@ -177,7 +177,7 @@
// Do not use unwrapForOldFunctions.
auto* dateTimeFormat = jsDynamicCast<IntlDateTimeFormat*>(vm, callFrame->thisValue());
if (UNLIKELY(!dateTimeFormat))
- return JSValue::encode(throwTypeError(globalObject, scope, "Intl.DateTimeFormat.prototype.formatRange called on value that's not an object initialized as a DateTimeFormat"_s));
+ return JSValue::encode(throwTypeError(globalObject, scope, "Intl.DateTimeFormat.prototype.formatRange called on value that's not a DateTimeFormat"_s));
JSValue startDateValue = callFrame->argument(0);
JSValue endDateValue = callFrame->argument(1);
@@ -204,7 +204,7 @@
// Do not use unwrapForOldFunctions.
auto* dateTimeFormat = jsDynamicCast<IntlDateTimeFormat*>(vm, callFrame->thisValue());
if (UNLIKELY(!dateTimeFormat))
- return JSValue::encode(throwTypeError(globalObject, scope, "Intl.DateTimeFormat.prototype.formatRangeToParts called on value that's not an object initialized as a DateTimeFormat"_s));
+ return JSValue::encode(throwTypeError(globalObject, scope, "Intl.DateTimeFormat.prototype.formatRangeToParts called on value that's not a DateTimeFormat"_s));
JSValue startDateValue = callFrame->argument(0);
JSValue endDateValue = callFrame->argument(1);
@@ -232,7 +232,7 @@
auto* dateTimeFormat = IntlDateTimeFormat::unwrapForOldFunctions(globalObject, callFrame->thisValue());
RETURN_IF_EXCEPTION(scope, { });
if (UNLIKELY(!dateTimeFormat))
- return JSValue::encode(throwTypeError(globalObject, scope, "Intl.DateTimeFormat.prototype.resolvedOptions called on value that's not an object initialized as a DateTimeFormat"_s));
+ return JSValue::encode(throwTypeError(globalObject, scope, "Intl.DateTimeFormat.prototype.resolvedOptions called on value that's not a DateTimeFormat"_s));
RELEASE_AND_RETURN(scope, JSValue::encode(dateTimeFormat->resolvedOptions(globalObject)));
}
Modified: trunk/Source/_javascript_Core/runtime/IntlDisplayNamesPrototype.cpp (281788 => 281789)
--- trunk/Source/_javascript_Core/runtime/IntlDisplayNamesPrototype.cpp 2021-08-31 01:56:19 UTC (rev 281788)
+++ trunk/Source/_javascript_Core/runtime/IntlDisplayNamesPrototype.cpp 2021-08-31 02:57:43 UTC (rev 281789)
@@ -81,7 +81,7 @@
auto* displayNames = jsDynamicCast<IntlDisplayNames*>(vm, callFrame->thisValue());
if (!displayNames)
- return throwVMTypeError(globalObject, scope, "Intl.DisplayNames.prototype.of called on value that's not an object initialized as a DisplayNames"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.DisplayNames.prototype.of called on value that's not a DisplayNames"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(displayNames->of(globalObject, callFrame->argument(0))));
}
@@ -94,7 +94,7 @@
auto* displayNames = jsDynamicCast<IntlDisplayNames*>(vm, callFrame->thisValue());
if (!displayNames)
- return throwVMTypeError(globalObject, scope, "Intl.DisplayNames.prototype.resolvedOptions called on value that's not an object initialized as a DisplayNames"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.DisplayNames.prototype.resolvedOptions called on value that's not a DisplayNames"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(displayNames->resolvedOptions(globalObject)));
}
Modified: trunk/Source/_javascript_Core/runtime/IntlListFormatPrototype.cpp (281788 => 281789)
--- trunk/Source/_javascript_Core/runtime/IntlListFormatPrototype.cpp 2021-08-31 01:56:19 UTC (rev 281788)
+++ trunk/Source/_javascript_Core/runtime/IntlListFormatPrototype.cpp 2021-08-31 02:57:43 UTC (rev 281789)
@@ -83,7 +83,7 @@
auto* listFormat = jsDynamicCast<IntlListFormat*>(vm, callFrame->thisValue());
if (!listFormat)
- return throwVMTypeError(globalObject, scope, "Intl.ListFormat.prototype.format called on value that's not an object initialized as a ListFormat"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.ListFormat.prototype.format called on value that's not a ListFormat"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(listFormat->format(globalObject, callFrame->argument(0))));
}
@@ -96,7 +96,7 @@
auto* listFormat = jsDynamicCast<IntlListFormat*>(vm, callFrame->thisValue());
if (!listFormat)
- return throwVMTypeError(globalObject, scope, "Intl.ListFormat.prototype.formatToParts called on value that's not an object initialized as a ListFormat"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.ListFormat.prototype.formatToParts called on value that's not a ListFormat"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(listFormat->formatToParts(globalObject, callFrame->argument(0))));
}
@@ -109,7 +109,7 @@
auto* listFormat = jsDynamicCast<IntlListFormat*>(vm, callFrame->thisValue());
if (!listFormat)
- return throwVMTypeError(globalObject, scope, "Intl.ListFormat.prototype.resolvedOptions called on value that's not an object initialized as a ListFormat"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.ListFormat.prototype.resolvedOptions called on value that's not a ListFormat"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(listFormat->resolvedOptions(globalObject)));
}
Modified: trunk/Source/_javascript_Core/runtime/IntlLocalePrototype.cpp (281788 => 281789)
--- trunk/Source/_javascript_Core/runtime/IntlLocalePrototype.cpp 2021-08-31 01:56:19 UTC (rev 281788)
+++ trunk/Source/_javascript_Core/runtime/IntlLocalePrototype.cpp 2021-08-31 02:57:43 UTC (rev 281789)
@@ -117,7 +117,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, callFrame->thisValue());
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.maximize called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.maximize called on value that's not a Locale"_s);
IntlLocale* newLocale = IntlLocale::create(vm, globalObject->localeStructure());
scope.release();
@@ -133,7 +133,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, callFrame->thisValue());
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.minimize called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.minimize called on value that's not a Locale"_s);
IntlLocale* newLocale = IntlLocale::create(vm, globalObject->localeStructure());
scope.release();
@@ -149,7 +149,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, callFrame->thisValue());
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.toString called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.toString called on value that's not a Locale"_s);
const String& fullString = locale->toString();
RELEASE_AND_RETURN(scope, JSValue::encode(fullString.isEmpty() ? jsUndefined() : jsString(vm, fullString)));
@@ -163,7 +163,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.baseName called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.baseName called on value that's not a Locale"_s);
const String& baseName = locale->baseName();
RELEASE_AND_RETURN(scope, JSValue::encode(baseName.isEmpty() ? jsUndefined() : jsString(vm, baseName)));
@@ -177,7 +177,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.calendar called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.calendar called on value that's not a Locale"_s);
const String& calendar = locale->calendar();
RELEASE_AND_RETURN(scope, JSValue::encode(calendar.isNull() ? jsUndefined() : jsString(vm, calendar)));
@@ -191,7 +191,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.calendars called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.calendars called on value that's not a Locale"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(locale->calendars(globalObject)));
}
@@ -204,7 +204,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.caseFirst called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.caseFirst called on value that's not a Locale"_s);
const String& caseFirst = locale->caseFirst();
RELEASE_AND_RETURN(scope, JSValue::encode(caseFirst.isNull() ? jsUndefined() : jsString(vm, caseFirst)));
@@ -218,7 +218,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.collation called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.collation called on value that's not a Locale"_s);
const String& collation = locale->collation();
RELEASE_AND_RETURN(scope, JSValue::encode(collation.isNull() ? jsUndefined() : jsString(vm, collation)));
@@ -232,7 +232,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.collations called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.collations called on value that's not a Locale"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(locale->collations(globalObject)));
}
@@ -245,7 +245,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.hourCycle called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.hourCycle called on value that's not a Locale"_s);
const String& hourCycle = locale->hourCycle();
RELEASE_AND_RETURN(scope, JSValue::encode(hourCycle.isNull() ? jsUndefined() : jsString(vm, hourCycle)));
@@ -259,7 +259,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.hourCycles called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.hourCycles called on value that's not a Locale"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(locale->hourCycles(globalObject)));
}
@@ -272,7 +272,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.numeric called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.numeric called on value that's not a Locale"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(jsBoolean(locale->numeric() == TriState::True)));
}
@@ -285,7 +285,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.numberingSystem called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.numberingSystem called on value that's not a Locale"_s);
const String& numberingSystem = locale->numberingSystem();
RELEASE_AND_RETURN(scope, JSValue::encode(numberingSystem.isNull() ? jsUndefined() : jsString(vm, numberingSystem)));
@@ -299,7 +299,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.numberingSystems called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.numberingSystems called on value that's not a Locale"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(locale->numberingSystems(globalObject)));
}
@@ -312,7 +312,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.language called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.language called on value that's not a Locale"_s);
const String& language = locale->language();
RELEASE_AND_RETURN(scope, JSValue::encode(language.isEmpty() ? jsUndefined() : jsString(vm, language)));
@@ -326,7 +326,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.script called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.script called on value that's not a Locale"_s);
const String& script = locale->script();
RELEASE_AND_RETURN(scope, JSValue::encode(script.isEmpty() ? jsUndefined() : jsString(vm, script)));
@@ -340,7 +340,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.region called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.region called on value that's not a Locale"_s);
const String& region = locale->region();
RELEASE_AND_RETURN(scope, JSValue::encode(region.isEmpty() ? jsUndefined() : jsString(vm, region)));
@@ -354,7 +354,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.timeZones called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.timeZones called on value that's not a Locale"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(locale->timeZones(globalObject)));
}
@@ -367,7 +367,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.textInfo called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.textInfo called on value that's not a Locale"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(locale->textInfo(globalObject)));
}
@@ -380,7 +380,7 @@
auto* locale = jsDynamicCast<IntlLocale*>(vm, JSValue::decode(thisValue));
if (!locale)
- return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.weekInfo called on value that's not an object initialized as a Locale"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Locale.prototype.weekInfo called on value that's not a Locale"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(locale->weekInfo(globalObject)));
}
Modified: trunk/Source/_javascript_Core/runtime/IntlNumberFormatPrototype.cpp (281788 => 281789)
--- trunk/Source/_javascript_Core/runtime/IntlNumberFormatPrototype.cpp 2021-08-31 01:56:19 UTC (rev 281788)
+++ trunk/Source/_javascript_Core/runtime/IntlNumberFormatPrototype.cpp 2021-08-31 02:57:43 UTC (rev 281789)
@@ -118,7 +118,7 @@
auto* nf = IntlNumberFormat::unwrapForOldFunctions(globalObject, JSValue::decode(thisValue));
RETURN_IF_EXCEPTION(scope, { });
if (UNLIKELY(!nf))
- return JSValue::encode(throwTypeError(globalObject, scope, "Intl.NumberFormat.prototype.format called on value that's not an object initialized as a NumberFormat"_s));
+ return JSValue::encode(throwTypeError(globalObject, scope, "Intl.NumberFormat.prototype.format called on value that's not a NumberFormat"_s));
JSBoundFunction* boundFormat = nf->boundFormat();
// 2. If nf.[[boundFormat]] is undefined,
@@ -148,7 +148,7 @@
// Do not use unwrapForOldFunctions.
auto* numberFormat = jsDynamicCast<IntlNumberFormat*>(vm, callFrame->thisValue());
if (UNLIKELY(!numberFormat))
- return JSValue::encode(throwTypeError(globalObject, scope, "Intl.NumberFormat.prototype.formatToParts called on value that's not an object initialized as a NumberFormat"_s));
+ return JSValue::encode(throwTypeError(globalObject, scope, "Intl.NumberFormat.prototype.formatToParts called on value that's not a NumberFormat"_s));
double value = callFrame->argument(0).toNumber(globalObject);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
@@ -166,7 +166,7 @@
auto* numberFormat = IntlNumberFormat::unwrapForOldFunctions(globalObject, callFrame->thisValue());
RETURN_IF_EXCEPTION(scope, { });
if (UNLIKELY(!numberFormat))
- return JSValue::encode(throwTypeError(globalObject, scope, "Intl.NumberFormat.prototype.resolvedOptions called on value that's not an object initialized as a NumberFormat"_s));
+ return JSValue::encode(throwTypeError(globalObject, scope, "Intl.NumberFormat.prototype.resolvedOptions called on value that's not a NumberFormat"_s));
RELEASE_AND_RETURN(scope, JSValue::encode(numberFormat->resolvedOptions(globalObject)));
}
Modified: trunk/Source/_javascript_Core/runtime/IntlPluralRulesPrototype.cpp (281788 => 281789)
--- trunk/Source/_javascript_Core/runtime/IntlPluralRulesPrototype.cpp 2021-08-31 01:56:19 UTC (rev 281788)
+++ trunk/Source/_javascript_Core/runtime/IntlPluralRulesPrototype.cpp 2021-08-31 02:57:43 UTC (rev 281789)
@@ -84,7 +84,7 @@
IntlPluralRules* pluralRules = jsDynamicCast<IntlPluralRules*>(vm, callFrame->thisValue());
if (!pluralRules)
- return JSValue::encode(throwTypeError(globalObject, scope, "Intl.PluralRules.prototype.select called on value that's not an object initialized as a PluralRules"_s));
+ return JSValue::encode(throwTypeError(globalObject, scope, "Intl.PluralRules.prototype.select called on value that's not a PluralRules"_s));
double value = callFrame->argument(0).toNumber(globalObject);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
@@ -102,7 +102,7 @@
IntlPluralRules* pluralRules = jsDynamicCast<IntlPluralRules*>(vm, callFrame->thisValue());
if (!pluralRules)
- return JSValue::encode(throwTypeError(globalObject, scope, "Intl.PluralRules.prototype.resolvedOptions called on value that's not an object initialized as a PluralRules"_s));
+ return JSValue::encode(throwTypeError(globalObject, scope, "Intl.PluralRules.prototype.resolvedOptions called on value that's not a PluralRules"_s));
RELEASE_AND_RETURN(scope, JSValue::encode(pluralRules->resolvedOptions(globalObject)));
}
Modified: trunk/Source/_javascript_Core/runtime/IntlRelativeTimeFormatPrototype.cpp (281788 => 281789)
--- trunk/Source/_javascript_Core/runtime/IntlRelativeTimeFormatPrototype.cpp 2021-08-31 01:56:19 UTC (rev 281788)
+++ trunk/Source/_javascript_Core/runtime/IntlRelativeTimeFormatPrototype.cpp 2021-08-31 02:57:43 UTC (rev 281789)
@@ -83,7 +83,7 @@
auto* relativeTimeFormat = jsDynamicCast<IntlRelativeTimeFormat*>(vm, callFrame->thisValue());
if (!relativeTimeFormat)
- return JSValue::encode(throwTypeError(globalObject, scope, "Intl.RelativeTimeFormat.prototype.format called on value that's not an object initialized as a RelativeTimeFormat"_s));
+ return JSValue::encode(throwTypeError(globalObject, scope, "Intl.RelativeTimeFormat.prototype.format called on value that's not a RelativeTimeFormat"_s));
double value = callFrame->argument(0).toNumber(globalObject);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
@@ -102,7 +102,7 @@
auto* relativeTimeFormat = jsDynamicCast<IntlRelativeTimeFormat*>(vm, callFrame->thisValue());
if (!relativeTimeFormat)
- return JSValue::encode(throwTypeError(globalObject, scope, "Intl.RelativeTimeFormat.prototype.formatToParts called on value that's not an object initialized as a RelativeTimeFormat"_s));
+ return JSValue::encode(throwTypeError(globalObject, scope, "Intl.RelativeTimeFormat.prototype.formatToParts called on value that's not a RelativeTimeFormat"_s));
double value = callFrame->argument(0).toNumber(globalObject);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
@@ -121,7 +121,7 @@
auto* relativeTimeFormat = jsDynamicCast<IntlRelativeTimeFormat*>(vm, callFrame->thisValue());
if (!relativeTimeFormat)
- return JSValue::encode(throwTypeError(globalObject, scope, "Intl.RelativeTimeFormat.prototype.resolvedOptions called on value that's not an object initialized as a RelativeTimeFormat"_s));
+ return JSValue::encode(throwTypeError(globalObject, scope, "Intl.RelativeTimeFormat.prototype.resolvedOptions called on value that's not a RelativeTimeFormat"_s));
RELEASE_AND_RETURN(scope, JSValue::encode(relativeTimeFormat->resolvedOptions(globalObject)));
}
Modified: trunk/Source/_javascript_Core/runtime/IntlSegmentIteratorPrototype.cpp (281788 => 281789)
--- trunk/Source/_javascript_Core/runtime/IntlSegmentIteratorPrototype.cpp 2021-08-31 01:56:19 UTC (rev 281788)
+++ trunk/Source/_javascript_Core/runtime/IntlSegmentIteratorPrototype.cpp 2021-08-31 02:57:43 UTC (rev 281789)
@@ -79,7 +79,7 @@
auto* segmentIterator = jsDynamicCast<IntlSegmentIterator*>(vm, callFrame->thisValue());
if (!segmentIterator)
- return throwVMTypeError(globalObject, scope, "Intl.SegmentIterator.prototype.next called on value that's not an object initialized as a SegmentIterator"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.SegmentIterator.prototype.next called on value that's not a SegmentIterator"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(segmentIterator->next(globalObject)));
}
Modified: trunk/Source/_javascript_Core/runtime/IntlSegmenterPrototype.cpp (281788 => 281789)
--- trunk/Source/_javascript_Core/runtime/IntlSegmenterPrototype.cpp 2021-08-31 01:56:19 UTC (rev 281788)
+++ trunk/Source/_javascript_Core/runtime/IntlSegmenterPrototype.cpp 2021-08-31 02:57:43 UTC (rev 281789)
@@ -81,7 +81,7 @@
auto* segmenter = jsDynamicCast<IntlSegmenter*>(vm, callFrame->thisValue());
if (!segmenter)
- return throwVMTypeError(globalObject, scope, "Intl.Segmenter.prototype.segment called on value that's not an object initialized as a Segmenter"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Segmenter.prototype.segment called on value that's not a Segmenter"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(segmenter->segment(globalObject, callFrame->argument(0))));
}
@@ -94,7 +94,7 @@
auto* segmenter = jsDynamicCast<IntlSegmenter*>(vm, callFrame->thisValue());
if (!segmenter)
- return throwVMTypeError(globalObject, scope, "Intl.Segmenter.prototype.resolvedOptions called on value that's not an object initialized as a Segmenter"_s);
+ return throwVMTypeError(globalObject, scope, "Intl.Segmenter.prototype.resolvedOptions called on value that's not a Segmenter"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(segmenter->resolvedOptions(globalObject)));
}
Modified: trunk/Source/_javascript_Core/runtime/IntlSegmentsPrototype.cpp (281788 => 281789)
--- trunk/Source/_javascript_Core/runtime/IntlSegmentsPrototype.cpp 2021-08-31 01:56:19 UTC (rev 281788)
+++ trunk/Source/_javascript_Core/runtime/IntlSegmentsPrototype.cpp 2021-08-31 02:57:43 UTC (rev 281789)
@@ -80,7 +80,7 @@
auto* segments = jsDynamicCast<IntlSegments*>(vm, callFrame->thisValue());
if (!segments)
- return throwVMTypeError(globalObject, scope, "%Segments.prototype%.containing called on value that's not an object initialized as a Segments"_s);
+ return throwVMTypeError(globalObject, scope, "%Segments.prototype%.containing called on value that's not a Segments"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(segments->containing(globalObject, callFrame->argument(0))));
}
@@ -93,7 +93,7 @@
auto* segments = jsDynamicCast<IntlSegments*>(vm, callFrame->thisValue());
if (!segments)
- return throwVMTypeError(globalObject, scope, "%Segments.prototype%[@@iterator] called on value that's not an object initialized as a Segments"_s);
+ return throwVMTypeError(globalObject, scope, "%Segments.prototype%[@@iterator] called on value that's not a Segments"_s);
RELEASE_AND_RETURN(scope, JSValue::encode(segments->createSegmentIterator(globalObject)));
}