bug 204659 - Security manager check needs adjusting. r=adamlock, sr=alecf, a=sspitzer

This commit is contained in:
dbradley%netscape.com 2003-05-10 04:10:29 +00:00
Родитель ccd3754fab
Коммит efd336ee4d
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -54,7 +54,7 @@ CommonConstructor(JSContext *cx, int name, JSObject *obj, uintN argc,
nsIXPCSecurityManager* sm = ccx.GetXPCContext()
->GetAppropriateSecurityManager(nsIXPCSecurityManager::HOOK_CALL_METHOD);
XPCWrappedNative * wrapper = ccx.GetWrapper();
if(!sm || NS_FAILED(sm->CanAccess(nsIXPCSecurityManager::ACCESS_CALL_METHOD,
if(sm && NS_FAILED(sm->CanAccess(nsIXPCSecurityManager::ACCESS_CALL_METHOD,
&ccx, ccx, ccx.GetFlattenedJSObject(),
wrapper->GetIdentityObject(),
wrapper->GetClassInfo(),

Просмотреть файл

@ -203,7 +203,7 @@ NS_IMETHODIMP nsDispatchSupport::IsClassSafeToHost(JSContext * cx,
nsIXPCSecurityManager* sm =
ccx.GetXPCContext()->GetAppropriateSecurityManager(
nsIXPCSecurityManager::HOOK_CREATE_INSTANCE);
*aResult = sm &&
*aResult = !sm ||
NS_SUCCEEDED(sm->CanCreateInstance(ccx, cid));
if(!*aResult)