Bug 569629 - Don't use a constructor for nsDOMWorkerPrincipal. r=bent,a=bsmedberg

This commit is contained in:
Mike Hommey 2010-11-07 09:25:39 +01:00
Родитель 99cba73ae1
Коммит 5a1208ecb4
1 изменённых файлов: 8 добавлений и 11 удалений

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

@ -49,18 +49,9 @@
#define LOG(_args) PR_LOG(gDOMThreadsLog, PR_LOG_DEBUG, _args) #define LOG(_args) PR_LOG(gDOMThreadsLog, PR_LOG_DEBUG, _args)
class nsDOMWorkerPrincipal : public JSPrincipals class nsDOMWorkerPrincipal
{ {
public: public:
nsDOMWorkerPrincipal() {
codebase = "domworkerthread";
getPrincipalArray = NULL;
globalPrivilegesEnabled = NULL;
refcount = 1;
destroy = nsDOMWorkerPrincipal::Destroy;
subsume = nsDOMWorkerPrincipal::Subsume;
}
static void Destroy(JSContext*, JSPrincipals*) { static void Destroy(JSContext*, JSPrincipals*) {
// nothing // nothing
} }
@ -70,7 +61,13 @@ public:
} }
}; };
static nsDOMWorkerPrincipal gWorkerPrincipal; static JSPrincipals gWorkerPrincipal =
{ "domworkerthread" /* codebase */,
NULL /* getPrincipalArray */,
NULL /* globalPrivilegesEnabled */,
1 /* refcount */,
nsDOMWorkerPrincipal::Destroy /* destroy */,
nsDOMWorkerPrincipal::Subsume /* subsume */ };
NS_IMPL_THREADSAFE_ISUPPORTS1(nsDOMWorkerSecurityManager, NS_IMPL_THREADSAFE_ISUPPORTS1(nsDOMWorkerSecurityManager,
nsIXPCSecurityManager) nsIXPCSecurityManager)