Compilation fix for bug 600015.
authorAndreas Gal <gal@mozilla.com>
Mon, 27 Sep 2010 16:27:30 -0700
changeset 54734 878819fe78eace6aede3d5392cd30228f57f96ad
parent 54733 4c7b72e4d2004137d9a5253363e1210b78df7b04
child 54735 5bd0b374d87b6557ad09186ac35aba5d8ce8d80e
push idunknown
push userunknown
push dateunknown
bugs600015
milestone2.0b7pre
Compilation fix for bug 600015.
js/jsd/jsd_high.c
--- a/js/jsd/jsd_high.c
+++ b/js/jsd/jsd_high.c
@@ -85,16 +85,17 @@ static JSBool
 
 static JSDContext*
 _newJSDContext(JSRuntime*         jsrt, 
                JSD_UserCallbacks* callbacks, 
                void*              user,
                JSObject*          scopeobj)
 {
     JSDContext* jsdc = NULL;
+    JSCrossCompartmentCall *call = NULL;
 
     if( ! jsrt )
         return NULL;
 
     if( ! _validateUserCallbacks(callbacks) )
         return NULL;
 
     jsdc = (JSDContext*) calloc(1, sizeof(JSDContext));
@@ -133,17 +134,16 @@ static JSDContext*
         goto label_newJSDContext_failure;
 
     jsdc->dumbContext = JS_NewContext(jsdc->jsrt, 256);
     if( ! jsdc->dumbContext )
         goto label_newJSDContext_failure;
 
     JS_BeginRequest(jsdc->dumbContext);
 
-    JSCrossCompartmentCall *call = NULL;
     if( scopeobj )
         call = JS_EnterCrossCompartmentCall(jsdc->dumbContext, scopeobj);
     jsdc->glob = JS_NewGlobalObject(jsdc->dumbContext, &global_class);
     if( call )
         JS_LeaveCrossCompartmentCall(call);
     if( ! jsdc->glob )
         goto label_newJSDContext_failure;