Bug 1238723 - Tab child needs to use default user context id when handling permissions. r=sicking

This commit is contained in:
Dave Huseby 2016-04-01 16:49:00 -04:00
Родитель a13a3ea88a
Коммит a4067fb951
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -2492,6 +2492,10 @@ ContentChild::RecvAddPermission(const IPC::Permission& permission)
nsAutoCString originNoSuffix;
PrincipalOriginAttributes attrs;
attrs.PopulateFromOrigin(permission.origin, originNoSuffix);
// we're doing this because we currently don't support isolating permissions
// by userContextId.
MOZ_ASSERT(attrs.mUserContextId == nsIScriptSecurityManager::DEFAULT_USER_CONTEXT_ID,
"permission user context should be set to default!");
nsCOMPtr<nsIURI> uri;
nsresult rv = NS_NewURI(getter_AddRefs(uri), originNoSuffix);