summaryrefslogtreecommitdiff
path: root/src/mongo/scripting/engine.h
diff options
context:
space:
mode:
authorJames Wahlin <james@mongodb.com>2020-01-24 14:15:09 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-07 14:07:37 +0000
commit0f36fdce71df08aa7c0703bda69a7045f96f41c8 (patch)
tree8e6f7a5c90b1a69c91a88ac1b07e42fce6d321fb /src/mongo/scripting/engine.h
parent3d821c25e2944668b7359a0bf6e586cc8625b9a2 (diff)
downloadmongo-0f36fdce71df08aa7c0703bda69a7045f96f41c8.tar.gz
SERVER-45456 Allow JavaScript on mongos
create mode 100644 jstests/noPassthrough/mr_noscripting.js delete mode 100644 jstests/noPassthroughWithMongod/mr_noscripting.js create mode 100644 jstests/sharding/agg_js_on_mongos.js create mode 100644 jstests/sharding/javascript_heap_limit.js
Diffstat (limited to 'src/mongo/scripting/engine.h')
-rw-r--r--src/mongo/scripting/engine.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mongo/scripting/engine.h b/src/mongo/scripting/engine.h
index 72ec298af9a..434b38ff921 100644
--- a/src/mongo/scripting/engine.h
+++ b/src/mongo/scripting/engine.h
@@ -217,8 +217,12 @@ public:
return createScope();
}
- virtual Scope* newScopeForCurrentThread() {
- return createScopeForCurrentThread();
+ virtual Scope* newScopeForCurrentThread(boost::optional<int> jsHeapLimitMB) {
+ return createScopeForCurrentThread(jsHeapLimitMB);
+ }
+
+ Scope* newScopeForCurrentThread() {
+ return newScopeForCurrentThread(boost::none);
}
virtual void runTest() = 0;
@@ -273,7 +277,7 @@ public:
protected:
virtual Scope* createScope() = 0;
- virtual Scope* createScopeForCurrentThread() = 0;
+ virtual Scope* createScopeForCurrentThread(boost::optional<int> jsHeapLimitMB) = 0;
void (*_scopeInitCallback)(Scope&);
private: