diff options
author | Spencer Jackson <spencer.jackson@mongodb.com> | 2017-02-15 15:37:45 -0500 |
---|---|---|
committer | Spencer Jackson <spencer.jackson@mongodb.com> | 2017-03-01 13:32:43 -0500 |
commit | 1ccab79c7716b88126384600efcd577d59c040d1 (patch) | |
tree | 2c4d1fdb8e610d835ef7a5be99879bf464f9dcfe | |
parent | 5cd4ba841e76a2c38ad3c7f9d5d9c2ab6c4ed293 (diff) | |
download | mongo-1ccab79c7716b88126384600efcd577d59c040d1.tar.gz |
SERVER-27954: Correctly parse code_w_s in shell
-rw-r--r-- | src/mongo/scripting/mozjs/valuereader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/scripting/mozjs/valuereader.cpp b/src/mongo/scripting/mozjs/valuereader.cpp index 1eedef58e86..61709bde6c8 100644 --- a/src/mongo/scripting/mozjs/valuereader.cpp +++ b/src/mongo/scripting/mozjs/valuereader.cpp @@ -71,7 +71,7 @@ void ValueReader::fromBSONElement(const BSONElement& elem, const BSONObj& parent if (scope->isJavaScriptProtectionEnabled()) { JS::AutoValueArray<2> args(_context); - ValueReader(_context, args[0]).fromStringData(elem.valueStringData()); + ValueReader(_context, args[0]).fromStringData(elem.codeWScopeCode()); ValueReader(_context, args[1]).fromBSON(elem.codeWScopeObject(), nullptr, readOnly); scope->getProto<CodeInfo>().newInstance(args, _value); |