summaryrefslogtreecommitdiff
path: root/src/mongo/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/scripting')
-rw-r--r--src/mongo/scripting/engine.cpp2
-rw-r--r--src/mongo/scripting/engine.h8
-rw-r--r--src/mongo/scripting/mozjs/mongo.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/scripting/engine.cpp b/src/mongo/scripting/engine.cpp
index c430e057dbb..d941e9834af 100644
--- a/src/mongo/scripting/engine.cpp
+++ b/src/mongo/scripting/engine.cpp
@@ -577,7 +577,7 @@ unique_ptr<Scope> ScriptEngine::getPooledScope(OperationContext* opCtx,
return p;
}
-void (*ScriptEngine::_connectCallback)(DBClientBase&) = nullptr;
+void (*ScriptEngine::_connectCallback)(DBClientBase&, StringData) = nullptr;
ScriptEngine* getGlobalScriptEngine() {
if (hasGlobalServiceContext())
diff --git a/src/mongo/scripting/engine.h b/src/mongo/scripting/engine.h
index 434b38ff921..a87d4edc2ea 100644
--- a/src/mongo/scripting/engine.h
+++ b/src/mongo/scripting/engine.h
@@ -259,12 +259,12 @@ public:
void setScopeInitCallback(void (*func)(Scope&)) {
_scopeInitCallback = func;
}
- static void setConnectCallback(void (*func)(DBClientBase&)) {
+ static void setConnectCallback(void (*func)(DBClientBase&, StringData)) {
_connectCallback = func;
}
- static void runConnectCallback(DBClientBase& c) {
+ static void runConnectCallback(DBClientBase& c, StringData uri) {
if (_connectCallback)
- _connectCallback(c);
+ _connectCallback(c, uri);
}
// engine implementation may either respond to interrupt events or
@@ -281,7 +281,7 @@ protected:
void (*_scopeInitCallback)(Scope&);
private:
- static void (*_connectCallback)(DBClientBase&);
+ static void (*_connectCallback)(DBClientBase&, StringData);
};
void installGlobalUtils(Scope& scope);
diff --git a/src/mongo/scripting/mozjs/mongo.cpp b/src/mongo/scripting/mozjs/mongo.cpp
index cbbcdb82658..9d13c551017 100644
--- a/src/mongo/scripting/mozjs/mongo.cpp
+++ b/src/mongo/scripting/mozjs/mongo.cpp
@@ -834,7 +834,7 @@ void MongoExternalInfo::construct(JSContext* cx, JS::CallArgs args) {
uasserted(ErrorCodes::InternalError, errmsg);
}
- ScriptEngine::runConnectCallback(*conn);
+ ScriptEngine::runConnectCallback(*conn, host);
JS::RootedObject thisv(cx);
scope->getProto<MongoExternalInfo>().newObject(&thisv);