summaryrefslogtreecommitdiff
path: root/js/src/jsstr.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2023-09-01 15:44:29 +0200
committerMoonchild <moonchild@palemoon.org>2023-09-01 15:44:29 +0200
commit2d48de9998d5c4f768af051ce997777be126f8cd (patch)
treec6023db91bfadaa8e1d7c4c12d90ad63bf810454 /js/src/jsstr.cpp
parent3b029cdfe482e5097ee09fa1998591faf9c1005b (diff)
parentee97a5dad40fb8d207b717cb2a0d487f54dd5f1d (diff)
downloaduxp-2d48de9998d5c4f768af051ce997777be126f8cd.tar.gz
Merge branch 'master' into releaseRC_20230901RB_20230904
Diffstat (limited to 'js/src/jsstr.cpp')
-rw-r--r--js/src/jsstr.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/js/src/jsstr.cpp b/js/src/jsstr.cpp
index fdee274c32..593cf4d708 100644
--- a/js/src/jsstr.cpp
+++ b/js/src/jsstr.cpp
@@ -3734,6 +3734,11 @@ js::ToStringSlow(ExclusiveContext* cx, typename MaybeRooted<Value, allowGC>::Han
JSMSG_SYMBOL_TO_STRING);
}
return nullptr;
+ } else if (v.isBigInt()) {
+ if (!allowGC)
+ return nullptr;
+ RootedBigInt i(cx, v.toBigInt());
+ str = BigInt::toString(cx, i, 10);
} else {
MOZ_ASSERT(v.isUndefined());
str = cx->names().undefined;