Scope::rename and ability to block db access prep for SERVER-1715

This commit is contained in:
Eliot Horowitz
2010-09-01 01:32:04 -04:00
parent a6e3b04263
commit b416e09061
6 changed files with 63 additions and 2 deletions

View File

@@ -1323,6 +1323,15 @@ namespace mongo {
}
}
void rename( const char * from , const char * to ){
smlock;
jsval v;
assert( JS_GetProperty( _context , _global , from , &v ) );
assert( JS_SetProperty( _context , _global , to , &v ) );
v = JSVAL_VOID;
assert( JS_SetProperty( _context , _global , from , &v ) );
}
// ---- functions -----
ScriptingFunction _createFunction( const char * code ){