bug 204659 - Security manager check needs adjusting. r=adamlock, sr=alecf, a=sspitzer
git-svn-id: svn://10.0.0.236/trunk@142299 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user