summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-08-28 15:36:12 -0400
committerEliot Horowitz <eliot@10gen.com>2009-08-28 15:36:12 -0400
commit13a01a4b482252312a1c49e57d6ae40fb471dfc2 (patch)
treeb427c6976bd949814264eac4c02a25b873cc6dfa /db
parent5f898ab0007fa6379a6e328d20a5eed481798fbf (diff)
downloadmongo-13a01a4b482252312a1c49e57d6ae40fb471dfc2.tar.gz
cleaning
Diffstat (limited to 'db')
-rw-r--r--db/matcher.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/db/matcher.cpp b/db/matcher.cpp
index c35500367bf..8bc76e5b404 100644
--- a/db/matcher.cpp
+++ b/db/matcher.cpp
@@ -544,22 +544,14 @@ namespace mongo {
uassert("$where compile error", false);
return false; // didn't compile
}
-
- /**if( 1 || jsobj.objsize() < 200 || where->fullObject ) */
- {
- if ( where->jsScope ){
- where->scope->init( where->jsScope );
- }
- where->scope->setThis( const_cast< BSONObj * >( &jsobj ) );
- where->scope->setObject( "obj", const_cast< BSONObj & >( jsobj ) );
- where->scope->setBoolean( "fullObject" , true ); // this is a hack b/c fullObject used to be relevant
+
+ if ( where->jsScope ){
+ where->scope->init( where->jsScope );
}
- /*else {
- BSONObjBuilder b;
- where->buildSubset(jsobj, b);
- BSONObj temp = b.done();
- where->scope->setObject( "obj" , &temp );
- }*/
+ where->scope->setThis( const_cast< BSONObj * >( &jsobj ) );
+ where->scope->setObject( "obj", const_cast< BSONObj & >( jsobj ) );
+ where->scope->setBoolean( "fullObject" , true ); // this is a hack b/c fullObject used to be relevant
+
int err = where->scope->invoke( where->func , BSONObj() , 1000 * 60 );
if ( err == -3 ) { // INVOKE_ERROR
stringstream ss;