зеркало из https://github.com/mozilla/pjs.git
Bug 600580 - TM: set right compartment in _newJSDContext r=gwagner
This commit is contained in:
Родитель
50d689f946
Коммит
5d580bfd83
|
@ -139,18 +139,21 @@ _newJSDContext(JSRuntime* jsrt,
|
|||
|
||||
JS_BeginRequest(jsdc->dumbContext);
|
||||
|
||||
if( scopeobj )
|
||||
call = JS_EnterCrossCompartmentCall(jsdc->dumbContext, scopeobj);
|
||||
jsdc->glob = JS_NewGlobalObject(jsdc->dumbContext, &global_class);
|
||||
if( call )
|
||||
JS_LeaveCrossCompartmentCall(call);
|
||||
jsdc->glob = JS_NewCompartmentAndGlobalObject(jsdc->dumbContext, &global_class, NULL);
|
||||
|
||||
if( ! jsdc->glob )
|
||||
goto label_newJSDContext_failure;
|
||||
|
||||
call = JS_EnterCrossCompartmentCall(jsdc->dumbContext, jsdc->glob);
|
||||
if( ! call )
|
||||
goto label_newJSDContext_failure;
|
||||
|
||||
if( ! JS_InitStandardClasses(jsdc->dumbContext, jsdc->glob) )
|
||||
goto label_newJSDContext_failure;
|
||||
|
||||
if( call )
|
||||
JS_LeaveCrossCompartmentCall(call);
|
||||
|
||||
JS_EndRequest(jsdc->dumbContext);
|
||||
|
||||
jsdc->data = NULL;
|
||||
|
|
Загрузка…
Ссылка в новой задаче