[Intl] Calls thisBigIntValue in BigInt toLocaleString
Bug: v8:9109 Change-Id: I5a79192c8168c81d8f35711f8983fb1acb260a10 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1559214 Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/master@{#60731}
This commit is contained in:
parent
d54dcce51d
commit
4e0b0c6544
@ -127,10 +127,17 @@ BUILTIN(BigIntPrototypeToLocaleString) {
|
||||
HandleScope scope(isolate);
|
||||
#ifdef V8_INTL_SUPPORT
|
||||
if (FLAG_harmony_intl_bigint) {
|
||||
// 1. Let x be ? thisBigIntValue(this value).
|
||||
Handle<BigInt> x;
|
||||
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
||||
isolate, x,
|
||||
ThisBigIntValue(isolate, args.receiver(),
|
||||
"BigInt.prototype.toLocaleString"));
|
||||
|
||||
RETURN_RESULT_OR_FAILURE(
|
||||
isolate, Intl::NumberToLocaleString(isolate, args.receiver(),
|
||||
args.atOrUndefined(isolate, 1),
|
||||
args.atOrUndefined(isolate, 2)));
|
||||
isolate,
|
||||
Intl::NumberToLocaleString(isolate, x, args.atOrUndefined(isolate, 1),
|
||||
args.atOrUndefined(isolate, 2)));
|
||||
}
|
||||
// Fallbacks to old toString implemention if flag is off or no
|
||||
// V8_INTL_SUPPORT
|
||||
|
@ -60,6 +60,7 @@ FEATURE_FLAGS = {
|
||||
'export-star-as-namespace-from-module': '--harmony-namespace-exports',
|
||||
'Object.fromEntries': '--harmony-object-from-entries',
|
||||
'hashbang': '--harmony-hashbang',
|
||||
'BigInt': '--harmony-intl-bigint',
|
||||
}
|
||||
|
||||
SKIPPED_FEATURES = set(['class-methods-private',
|
||||
|
Loading…
Reference in New Issue
Block a user