summaryrefslogtreecommitdiff
path: root/src/mongo/scripting/mozjs/numberlong.cpp
diff options
context:
space:
mode:
authorMatt Cotter <matt.cotter@mongodb.com>2016-08-31 13:38:20 -0400
committerMatt Cotter <matt.cotter@mongodb.com>2016-09-06 14:02:27 -0400
commit0c8d2ee3bab74599c80264a08afca2aae42ce27b (patch)
treee2480e5106a848dfb3bfefd1b2d38bdf8e71ef5f /src/mongo/scripting/mozjs/numberlong.cpp
parentd6cefd52d4ccbf6f94238be340453f8353cfee0a (diff)
downloadmongo-0c8d2ee3bab74599c80264a08afca2aae42ce27b.tar.gz
SERVER-25887 fix autocomplete for NumberLong
Diffstat (limited to 'src/mongo/scripting/mozjs/numberlong.cpp')
-rw-r--r--src/mongo/scripting/mozjs/numberlong.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mongo/scripting/mozjs/numberlong.cpp b/src/mongo/scripting/mozjs/numberlong.cpp
index 02cd513b1b6..7ac68adec3c 100644
--- a/src/mongo/scripting/mozjs/numberlong.cpp
+++ b/src/mongo/scripting/mozjs/numberlong.cpp
@@ -206,19 +206,20 @@ void NumberLongInfo::postInstall(JSContext* cx, JS::HandleObject global, JS::Han
getScope(cx)->getInternedStringId(InternedString::floatApprox),
undef,
JSPROP_ENUMERATE | JSPROP_SHARED,
- smUtils::wrapConstrainedMethod<Functions::floatApprox, true, NumberLongInfo>,
+ smUtils::wrapConstrainedMethod<Functions::floatApprox, false, NumberLongInfo>,
nullptr)) {
uasserted(ErrorCodes::JSInterpreterFailure, "Failed to JS_DefinePropertyById");
}
// top
- if (!JS_DefinePropertyById(cx,
- proto,
- getScope(cx)->getInternedStringId(InternedString::top),
- undef,
- JSPROP_ENUMERATE | JSPROP_SHARED,
- smUtils::wrapConstrainedMethod<Functions::top, true, NumberLongInfo>,
- nullptr)) {
+ if (!JS_DefinePropertyById(
+ cx,
+ proto,
+ getScope(cx)->getInternedStringId(InternedString::top),
+ undef,
+ JSPROP_ENUMERATE | JSPROP_SHARED,
+ smUtils::wrapConstrainedMethod<Functions::top, false, NumberLongInfo>,
+ nullptr)) {
uasserted(ErrorCodes::JSInterpreterFailure, "Failed to JS_DefinePropertyById");
}
@@ -229,7 +230,7 @@ void NumberLongInfo::postInstall(JSContext* cx, JS::HandleObject global, JS::Han
getScope(cx)->getInternedStringId(InternedString::bottom),
undef,
JSPROP_ENUMERATE | JSPROP_SHARED,
- smUtils::wrapConstrainedMethod<Functions::bottom, true, NumberLongInfo>,
+ smUtils::wrapConstrainedMethod<Functions::bottom, false, NumberLongInfo>,
nullptr)) {
uasserted(ErrorCodes::JSInterpreterFailure, "Failed to JS_DefinePropertyById");
}