diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2018-09-14 13:29:37 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2018-09-14 13:29:37 -0400 |
commit | 846a6c19839601ce66f27877b348a4a5150a453d (patch) | |
tree | fc4607768e3801fa4880f4bea0724686493d636f /buildscripts | |
parent | 7daa72a1600fae6753034ca1bcdfd7eeceedb6ae (diff) | |
download | mongo-846a6c19839601ce66f27877b348a4a5150a453d.tar.gz |
SERVER-36637 IDL objects should hold owned BSONObjs
Diffstat (limited to 'buildscripts')
-rw-r--r-- | buildscripts/idl/idl/generator.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/buildscripts/idl/idl/generator.py b/buildscripts/idl/idl/generator.py index dd8349dea2e..65bdfe14647 100644 --- a/buildscripts/idl/idl/generator.py +++ b/buildscripts/idl/idl/generator.py @@ -785,9 +785,10 @@ class _CppSourceFileWriter(_CppFileWriterBase): return common.template_args("${method_name}(${expression})", method_name=method_name, expression=expression) - # BSONObjects are allowed to be pass through without deserialization + # BSONObjects are allowed to be pass through without deserialization but we must return + # them as Owned since we are going to store them in the IDL generated class assert field.bson_serialization_type == ['object'] - return expression + return expression + ".getOwned()" # Call a static class method with the signature: # Class Class::method(const BSONElement& value) |