summaryrefslogtreecommitdiff
path: root/js/src/jscompartment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jscompartment.cpp')
-rw-r--r--js/src/jscompartment.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jscompartment.cpp b/js/src/jscompartment.cpp
index c93dee510b..926c7e3c86 100644
--- a/js/src/jscompartment.cpp
+++ b/js/src/jscompartment.cpp
@@ -340,6 +340,21 @@ JSCompartment::wrap(JSContext* cx, MutableHandleString strp)
}
bool
+JSCompartment::wrap(JSContext* cx, MutableHandleBigInt bi)
+{
+ MOZ_ASSERT(cx->compartment() == this);
+
+ if (bi->zone() == cx->zone())
+ return true;
+
+ BigInt* copy = BigInt::copy(cx, bi);
+ if (!copy)
+ return false;
+ bi.set(copy);
+ return true;
+}
+
+bool
JSCompartment::getNonWrapperObjectForCurrentCompartment(JSContext* cx, MutableHandleObject obj)
{
// Ensure that we have entered a compartment.