summaryrefslogtreecommitdiff
path: root/js/public
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2023-07-21 04:10:47 -0500
committerBrian Smith <brian@dbsoft.org>2023-07-21 04:10:47 -0500
commit0587c8511449705ea2827312982df834d151b72a (patch)
treefbbaba877b39f8d353dbfef8fc16cae63e95406d /js/public
parentf4c134225c4433969392611eeb99e75be47e4660 (diff)
downloaduxp-0587c8511449705ea2827312982df834d151b72a.tar.gz
Issue #1240 - Part 8 - Fix incorrect asserts with debug enabled.
Fix BigInt errors in remainder operations https://bugzilla.mozilla.org/show_bug.cgi?id=1524136 Also fix 2 debug asserts in fallthroughs due to missing BigInt cases.
Diffstat (limited to 'js/public')
-rw-r--r--js/public/Value.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/js/public/Value.h b/js/public/Value.h
index e21b104a80..30f4670049 100644
--- a/js/public/Value.h
+++ b/js/public/Value.h
@@ -1508,6 +1508,8 @@ DispatchTyped(F f, const JS::Value& val, Args&&... args)
return f(&val.toObject(), mozilla::Forward<Args>(args)...);
if (val.isSymbol())
return f(val.toSymbol(), mozilla::Forward<Args>(args)...);
+ if (val.isBigInt())
+ return f(val.toBigInt(), mozilla::Forward<Args>(args)...);
if (MOZ_UNLIKELY(val.isPrivateGCThing()))
return DispatchTyped(f, val.toGCCellPtr(), mozilla::Forward<Args>(args)...);
MOZ_ASSERT(!val.isGCThing());