Bug 1527505 - Part 9: Make nsIPermissionManager accept ACString arguments for permission types instead of raw C strings; r=nika
This will mean that in places like the tight loop in GetTypeIndex() we would no longer require calling strlen() on the input type argument once per loop iteration. Depends on D20236 Differential Revision: https://phabricator.services.mozilla.com/D20237
This commit is contained in:
@@ -259,8 +259,8 @@ static bool PrincipalAllowsBrowserFrame(nsIPrincipal* aPrincipal) {
|
||||
mozilla::services::GetPermissionManager();
|
||||
NS_ENSURE_TRUE(permMgr, false);
|
||||
uint32_t permission = nsIPermissionManager::DENY_ACTION;
|
||||
nsresult rv =
|
||||
permMgr->TestPermissionFromPrincipal(aPrincipal, "browser", &permission);
|
||||
nsresult rv = permMgr->TestPermissionFromPrincipal(
|
||||
aPrincipal, NS_LITERAL_CSTRING("browser"), &permission);
|
||||
NS_ENSURE_SUCCESS(rv, false);
|
||||
return permission == nsIPermissionManager::ALLOW_ACTION;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user