summaryrefslogtreecommitdiff
path: root/src/mongo/scripting/mozjs/proxyscope.h
diff options
context:
space:
mode:
authorJason Carey <jcarey@argv.me>2017-08-29 14:26:07 -0400
committerJason Carey <jcarey@argv.me>2017-08-30 14:48:37 -0400
commit79b47945a6aae707d44e05669d991d86b157a14b (patch)
tree3b5fde6583e50eb5a5ee1cce61b0a746bff811d0 /src/mongo/scripting/mozjs/proxyscope.h
parent697832f5474879c32713f78c5a9e27bbd2c5d19d (diff)
downloadmongo-79b47945a6aae707d44e05669d991d86b157a14b.tar.gz
SERVER-30875 add requireOwnedObjects() to scope
Add a flag to JS scopes that requires that bson objects bound to the scope be owned. This should allow for more easy auditing of scopes that don't explicitly manage lifetime with advanceGeneration.
Diffstat (limited to 'src/mongo/scripting/mozjs/proxyscope.h')
-rw-r--r--src/mongo/scripting/mozjs/proxyscope.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/scripting/mozjs/proxyscope.h b/src/mongo/scripting/mozjs/proxyscope.h
index 248e80a068c..9e779fa9ee9 100644
--- a/src/mongo/scripting/mozjs/proxyscope.h
+++ b/src/mongo/scripting/mozjs/proxyscope.h
@@ -129,6 +129,8 @@ public:
void advanceGeneration() override;
+ void requireOwnedObjects() override;
+
double getNumber(const char* field) override;
int getNumberInt(const char* field) override;
long long getNumberLongLong(const char* field) override;