Bug 1040333 - Set principal flags in WorkerPrivateParent ctor. r=khuey

This commit is contained in:
Reuben Morais 2014-08-20 14:34:14 -03:00
Родитель ff85627591
Коммит c0344960db
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -3844,6 +3844,12 @@ WorkerPrivate::GetLoadInfo(JSContext* aCx, nsPIDOMWindow* aWindow,
NS_ENSURE_SUCCESS(rv, rv);
loadInfo.mXHRParamsAllowed = perm == nsIPermissionManager::ALLOW_ACTION;
uint16_t appStatus = loadInfo.mPrincipal->GetAppStatus();
loadInfo.mIsInPrivilegedApp =
(appStatus == nsIPrincipal::APP_STATUS_CERTIFIED ||
appStatus == nsIPrincipal::APP_STATUS_PRIVILEGED);
loadInfo.mIsInCertifiedApp = (appStatus == nsIPrincipal::APP_STATUS_CERTIFIED);
} else {
// Not a window
MOZ_ASSERT(isChrome);