summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2009-05-28 17:28:17 -0400
committerAaron <aaron@10gen.com>2009-05-28 17:28:17 -0400
commitaf465b41ea8bb973690b5b1145b8ec7e5ec2a9f0 (patch)
tree4b919ec34a4eb6ea08125ca5ca8ab29f2039cfd4
parentabd24eb7deee163120c7fc26dfa7e2bb4eda036d (diff)
parent5c5dbc5a53b3cefc81c2cd623a7298165e94dc42 (diff)
downloadmongo-af465b41ea8bb973690b5b1145b8ec7e5ec2a9f0.tar.gz
Merge branch 'master' of git@github.com:mongodb/mongo
-rw-r--r--jstests/sharding/shard5.js2
-rw-r--r--scripting/engine_spidermonkey.cpp8
2 files changed, 7 insertions, 3 deletions
diff --git a/jstests/sharding/shard5.js b/jstests/sharding/shard5.js
index 0d519c068ca..2553b8e8c84 100644
--- a/jstests/sharding/shard5.js
+++ b/jstests/sharding/shard5.js
@@ -40,7 +40,7 @@ print( "* A" );
assert.eq( 7 , s.getDB( "test" ).foo.find().toArray().length , "normal B 1" );
s2.getDB( "test" ).foo.save( { num : 2 } );
-sleep( 200 ); // give the write back time to happen
+sleep( 500 ); // give the write back time to happen
assert.eq( 8 , s2.getDB( "test" ).foo.find().toArray().length , "other B 2" );
s.stop();
diff --git a/scripting/engine_spidermonkey.cpp b/scripting/engine_spidermonkey.cpp
index 2fb4beecdb8..f450a1e8c03 100644
--- a/scripting/engine_spidermonkey.cpp
+++ b/scripting/engine_spidermonkey.cpp
@@ -156,7 +156,9 @@ namespace mongo {
append( b , name , getProperty( o , name.c_str() ) , orig[name].type() );
}
-
+
+ JS_DestroyIdArray( _context , properties );
+
return b.obj();
}
@@ -486,13 +488,15 @@ namespace mongo {
assert( JS_ValueToId( cx , c.toval( name.c_str() ) , idp ) );
}
else {
+ delete it;
*statep = 0;
}
return JS_TRUE;
}
if ( enum_op == JSENUMERATE_DESTROY ){
- delete it;
+ if ( it )
+ delete it;
return JS_TRUE;
}