summaryrefslogtreecommitdiff
path: root/jstests/core/where5.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/where5.js')
-rw-r--r--jstests/core/where5.js5
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;
}