зеркало из https://github.com/mozilla/pjs.git
Bug 600580 - TM: set right compartment in _newJSDContext r=gregor
This commit is contained in:
Родитель
57be41ce17
Коммит
c78ba1198f
|
@ -139,17 +139,20 @@ _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, scopeobj);
|
||||
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче