зеркало из https://github.com/mozilla/pjs.git
bug 204659 - Security manager check needs adjusting. r=adamlock, sr=alecf, a=sspitzer
This commit is contained in:
Родитель
ccd3754fab
Коммит
efd336ee4d
|
@ -54,7 +54,7 @@ CommonConstructor(JSContext *cx, int name, JSObject *obj, uintN argc,
|
||||||
nsIXPCSecurityManager* sm = ccx.GetXPCContext()
|
nsIXPCSecurityManager* sm = ccx.GetXPCContext()
|
||||||
->GetAppropriateSecurityManager(nsIXPCSecurityManager::HOOK_CALL_METHOD);
|
->GetAppropriateSecurityManager(nsIXPCSecurityManager::HOOK_CALL_METHOD);
|
||||||
XPCWrappedNative * wrapper = ccx.GetWrapper();
|
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(),
|
&ccx, ccx, ccx.GetFlattenedJSObject(),
|
||||||
wrapper->GetIdentityObject(),
|
wrapper->GetIdentityObject(),
|
||||||
wrapper->GetClassInfo(),
|
wrapper->GetClassInfo(),
|
||||||
|
|
|
@ -203,7 +203,7 @@ NS_IMETHODIMP nsDispatchSupport::IsClassSafeToHost(JSContext * cx,
|
||||||
nsIXPCSecurityManager* sm =
|
nsIXPCSecurityManager* sm =
|
||||||
ccx.GetXPCContext()->GetAppropriateSecurityManager(
|
ccx.GetXPCContext()->GetAppropriateSecurityManager(
|
||||||
nsIXPCSecurityManager::HOOK_CREATE_INSTANCE);
|
nsIXPCSecurityManager::HOOK_CREATE_INSTANCE);
|
||||||
*aResult = sm &&
|
*aResult = !sm ||
|
||||||
NS_SUCCEEDED(sm->CanCreateInstance(ccx, cid));
|
NS_SUCCEEDED(sm->CanCreateInstance(ccx, cid));
|
||||||
|
|
||||||
if(!*aResult)
|
if(!*aResult)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче