diff options
author | Dwight <dmerriman@gmail.com> | 2008-03-29 17:32:42 -0400 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2008-03-29 17:32:42 -0400 |
commit | 37095424598dc1431e633097cca1d6875201a9c4 (patch) | |
tree | 53896d5e633f386b110ef990509e479d0dd5c389 | |
parent | 11e09542d43b06f09f40e6c13f2f11d5bde067e3 (diff) | |
download | mongo-37095424598dc1431e633097cca1d6875201a9c4.tar.gz |
add assert
-rw-r--r-- | db/query.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/db/query.cpp b/db/query.cpp index b9ae1836039..b52f2a6ab59 100644 --- a/db/query.cpp +++ b/db/query.cpp @@ -622,8 +622,8 @@ QueryResult* runQuery(const char *ns, int ntoskip, int _ntoreturn, JSObj jsobj, query = jsobj;
auto_ptr<JSMatcher> matcher(new JSMatcher(query));
-JSMatcher &debug1 = *matcher;
-assert( debug1.getN() < 5000 );
+ JSMatcher &debug1 = *matcher;
+ assert( debug1.getN() < 5000 );
int nscanned = 0;
auto_ptr<Cursor> c = getSpecialCursor(ns);
@@ -659,6 +659,7 @@ assert( debug.getN() < 5000 ); }
else {
bool ok = true;
+ assert( js.objsize() >= 0 ); //defensive for segfaults
if( filter.get() ) {
// we just want certain fields from the object.
JSObj x;
|