summaryrefslogtreecommitdiff
path: root/src/mongo/scripting/mozjs/cursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/scripting/mozjs/cursor.cpp')
-rw-r--r--src/mongo/scripting/mozjs/cursor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/scripting/mozjs/cursor.cpp b/src/mongo/scripting/mozjs/cursor.cpp
index 072e2ffb999..4264fdfc23c 100644
--- a/src/mongo/scripting/mozjs/cursor.cpp
+++ b/src/mongo/scripting/mozjs/cursor.cpp
@@ -32,6 +32,7 @@
#include "mongo/scripting/mozjs/bson.h"
#include "mongo/scripting/mozjs/implscope.h"
+#include "mongo/scripting/mozjs/internedstring.h"
#include "mongo/scripting/mozjs/objectwrapper.h"
#include "mongo/scripting/mozjs/valuereader.h"
#include "mongo/scripting/mozjs/wrapconstrainedmethod.h"
@@ -81,7 +82,7 @@ void CursorInfo::Functions::next::call(JSContext* cx, JS::CallArgs args) {
ObjectWrapper o(cx, args.thisv());
BSONObj bson = cursor->next();
- bool ro = o.hasField("_ro") ? o.getBoolean("_ro") : false;
+ bool ro = o.hasField(InternedString::_ro) ? o.getBoolean(InternedString::_ro) : false;
// getOwned because cursor->next() gives us unowned bson from an internal
// buffer and we need to make a copy
@@ -111,7 +112,7 @@ void CursorInfo::Functions::objsLeftInBatch::call(JSContext* cx, JS::CallArgs ar
}
void CursorInfo::Functions::readOnly::call(JSContext* cx, JS::CallArgs args) {
- ObjectWrapper(cx, args.thisv()).setBoolean("_ro", true);
+ ObjectWrapper(cx, args.thisv()).setBoolean(InternedString::_ro, true);
args.rval().set(args.thisv());
}