summaryrefslogtreecommitdiff
path: root/src/mongo/scripting/mozjs/proxyscope.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/scripting/mozjs/proxyscope.cpp')
-rw-r--r--src/mongo/scripting/mozjs/proxyscope.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/mongo/scripting/mozjs/proxyscope.cpp b/src/mongo/scripting/mozjs/proxyscope.cpp
index a474eb1a719..eb554b8573b 100644
--- a/src/mongo/scripting/mozjs/proxyscope.cpp
+++ b/src/mongo/scripting/mozjs/proxyscope.cpp
@@ -158,6 +158,29 @@ BSONObj MozJSProxyScope::getObject(const char* field) {
return out;
}
+OID MozJSProxyScope::getOID(const char* field) {
+ OID out;
+ run([&] { out = _implScope->getOID(field); });
+ return out;
+}
+
+void MozJSProxyScope::getBinData(const char* field,
+ std::function<void(const BSONBinData&)> withBinData) {
+ run([&] { _implScope->getBinData(field, std::move(withBinData)); });
+}
+
+Timestamp MozJSProxyScope::getTimestamp(const char* field) {
+ Timestamp out;
+ run([&] { out = _implScope->getTimestamp(field); });
+ return out;
+}
+
+JSRegEx MozJSProxyScope::getRegEx(const char* field) {
+ JSRegEx out;
+ run([&] { out = _implScope->getRegEx(field); });
+ return out;
+}
+
void MozJSProxyScope::setNumber(const char* field, double val) {
run([&] { _implScope->setNumber(field, val); });
}