summaryrefslogtreecommitdiff
path: root/src/mongo/scripting/engine_v8-3.25.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/scripting/engine_v8-3.25.h')
-rw-r--r--src/mongo/scripting/engine_v8-3.25.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/scripting/engine_v8-3.25.h b/src/mongo/scripting/engine_v8-3.25.h
index 87d1f78ddbf..c75c626019d 100644
--- a/src/mongo/scripting/engine_v8-3.25.h
+++ b/src/mongo/scripting/engine_v8-3.25.h
@@ -172,12 +172,18 @@ namespace mongo {
/** check if there is a pending killOp request */
bool isKillPending() const;
+
+ /**
+ * Obtains the operation context associated with this Scope, so it can be given to the
+ * DBDirectClient used by the V8 engine's connection. Only needed for dbEval.
+ */
+ OperationContext* getOpContext() const;
/**
* Connect to a local database, create a Mongo object instance, and load any
* server-side js into the global object
*/
- virtual void localConnect(const char* dbName);
+ virtual void localConnectForDbEval(OperationContext* txn, const char* dbName);
virtual void externalSetup();
@@ -516,6 +522,7 @@ namespace mongo {
bool _inNativeExecution; // protected by _interruptLock
bool _pendingKill; // protected by _interruptLock
int _opId; // op id for this scope
+ OperationContext* _opCtx; // Op context for DbEval
};
/// Helper to extract V8Scope for an Isolate