summaryrefslogtreecommitdiff
path: root/src/mongo/bson/bsonelement.cpp
diff options
context:
space:
mode:
authorSpencer Jackson <spencer.jackson@mongodb.com>2018-08-20 14:18:30 -0400
committerSpencer Jackson <spencer.jackson@mongodb.com>2018-09-17 17:21:40 -0400
commitf99914d14b76718f1fef879cfaabe23c0c8f0857 (patch)
treee1da0b70c4d958cd59e671166bec0dc9ce9f3a57 /src/mongo/bson/bsonelement.cpp
parentd246e38f3dad15b9919773ffe6a2fa59288034f2 (diff)
downloadmongo-f99914d14b76718f1fef879cfaabe23c0c8f0857.tar.gz
SERVER-36606: Allow construction of large BSON objects
Diffstat (limited to 'src/mongo/bson/bsonelement.cpp')
-rw-r--r--src/mongo/bson/bsonelement.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/bson/bsonelement.cpp b/src/mongo/bson/bsonelement.cpp
index 42151c23b50..96f2c21410c 100644
--- a/src/mongo/bson/bsonelement.cpp
+++ b/src/mongo/bson/bsonelement.cpp
@@ -568,7 +568,7 @@ bool BSONElement::binaryEqualValues(const BSONElement& rhs) const {
BSONObj BSONElement::embeddedObjectUserCheck() const {
if (MONGO_likely(isABSONObj()))
- return BSONObj(value());
+ return BSONObj(value(), BSONObj::LargeSizeTrait{});
std::stringstream ss;
ss << "invalid parameter: expected an object (" << fieldName() << ")";
uasserted(10065, ss.str());
@@ -577,7 +577,7 @@ BSONObj BSONElement::embeddedObjectUserCheck() const {
BSONObj BSONElement::embeddedObject() const {
verify(isABSONObj());
- return BSONObj(value());
+ return BSONObj(value(), BSONObj::LargeSizeTrait{});
}
BSONObj BSONElement::codeWScopeObject() const {