зеркало из https://github.com/mozilla/gecko-dev.git
Bug 569629 - Don't use a constructor for nsDOMWorkerPrincipal. r=bent,a=bsmedberg
This commit is contained in:
Родитель
99cba73ae1
Коммит
5a1208ecb4
|
@ -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)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче