From ac0cebb3d0190dad28533eeda62cb8cf1c2ca8e0 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Thu, 4 Jun 2009 12:22:26 -0400 Subject: [PATCH] fix shell var SERVER-95 --- scripting/engine_spidermonkey.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scripting/engine_spidermonkey.cpp b/scripting/engine_spidermonkey.cpp index 4f9c96eb040..2c1e647b3bc 100644 --- a/scripting/engine_spidermonkey.cpp +++ b/scripting/engine_spidermonkey.cpp @@ -756,6 +756,7 @@ namespace mongo { _global = JS_NewObject( _context , &global_class, NULL, NULL); massert( "JS_NewObject failed for global" , _global ); + JS_SetGlobalObject( _context , _global ); massert( "js init failed" , JS_InitStandardClasses( _context , _global ) ); JS_DefineFunctions( _context , _global , globalHelpers );