diff options
author | Benety Goh <benety@mongodb.com> | 2014-08-01 17:13:06 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2014-08-12 19:35:21 -0400 |
commit | ce36d23ba2fe7962353668934c777c2f6263d078 (patch) | |
tree | 80b90c460450b1c9d3e156970c38a40b7b8fa8a4 | |
parent | 82e53c90774707a51e3f1b82c5b672a3e3700640 (diff) | |
download | mongo-ce36d23ba2fe7962353668934c777c2f6263d078.tar.gz |
SERVER-14778 added test to check that native function properties _native_function and _native_data are hidden from client
-rw-r--r-- | jstests/core/where5.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/jstests/core/where5.js b/jstests/core/where5.js index e4a5f353ec8..d7140cd21f6 100644 --- a/jstests/core/where5.js +++ b/jstests/core/where5.js @@ -1,4 +1,5 @@ // Tests toString() on _v8_function in object constructor. +// Verifies that native functions do not expose the _native_function and _native_data properties. var t = db.where5; @@ -16,6 +17,10 @@ function printIdConstructor(doc) { // This used to crash. doc._id.constructor._v8_function.toString(); + // Verify that function and data fields are hidden. + assert(!('_native_function' in sleep)); + assert(!('_native_data' in sleep)); + // Predicate for matching document in collection. return true; } |