summaryrefslogtreecommitdiff
path: root/src/mongo/scripting/mozjs/implscope.cpp
diff options
context:
space:
mode:
authorApollon Oikonomopoulos <apoikos@debian.org>2017-10-07 23:39:33 +0300
committerApollon Oikonomopoulos <apoikos@debian.org>2017-10-07 23:39:33 +0300
commit930687d86a670280fe7e5f98534183a571eaecd1 (patch)
tree96a72c5972d8dffae19e55b704d6dc97d890ca8d /src/mongo/scripting/mozjs/implscope.cpp
parent434e53cba2b14c1a4f04a0b3fb557507d0d9a77f (diff)
New upstream version 3.2.17upstream/3.2.17
Diffstat (limited to 'src/mongo/scripting/mozjs/implscope.cpp')
-rw-r--r--src/mongo/scripting/mozjs/implscope.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/scripting/mozjs/implscope.cpp b/src/mongo/scripting/mozjs/implscope.cpp
index 3b260c1558c..e85efd97505 100644
--- a/src/mongo/scripting/mozjs/implscope.cpp
+++ b/src/mongo/scripting/mozjs/implscope.cpp
@@ -322,6 +322,7 @@ MozJSImplScope::MozJSImplScope(MozJSScriptEngine* engine)
_status(Status::OK()),
_quickExit(false),
_generation(0),
+ _requireOwnedObjects(false),
_hasOutOfMemoryException(false),
_binDataProto(_context),
_bsonProto(_context),
@@ -749,6 +750,7 @@ void MozJSImplScope::reset() {
unregisterOperation();
_pendingKill.store(false);
_pendingGC.store(false);
+ _requireOwnedObjects = false;
advanceGeneration();
}
@@ -869,6 +871,14 @@ void MozJSImplScope::advanceGeneration() {
_generation++;
}
+void MozJSImplScope::requireOwnedObjects() {
+ _requireOwnedObjects = true;
+}
+
+bool MozJSImplScope::requiresOwnedObjects() const {
+ return _requireOwnedObjects;
+}
+
const std::string& MozJSImplScope::getParentStack() const {
return _parentStack;
}