summaryrefslogtreecommitdiff
path: root/js/src/jscompartmentinlines.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jscompartmentinlines.h')
-rw-r--r--js/src/jscompartmentinlines.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/jscompartmentinlines.h b/js/src/jscompartmentinlines.h
index c17ba99de2..c092889e28 100644
--- a/js/src/jscompartmentinlines.h
+++ b/js/src/jscompartmentinlines.h
@@ -79,6 +79,14 @@ JSCompartment::wrap(JSContext* cx, JS::MutableHandleValue vp)
return true;
}
+ if (vp.isBigInt()) {
+ JS::RootedBigInt bi(cx, vp.toBigInt());
+ if (!wrap(cx, &bi))
+ return false;
+ vp.setBigInt(bi);
+ return true;
+ }
+
MOZ_ASSERT(vp.isObject());
/*