forked from mirrors/gecko-dev
Bug 1544127 - Make sure nsIPrincipal is only accessed on main thread, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D135681
This commit is contained in:
parent
655e5ff45c
commit
e2611a28e9
1 changed files with 2 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ using namespace mozilla::ipc;
|
|||
|
||||
NS_IMETHODIMP_(MozExternalRefCountType)
|
||||
nsJSPrincipals::AddRef() {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(int32_t(refcount) >= 0, "illegal refcnt");
|
||||
nsrefcnt count = ++refcount;
|
||||
NS_LOG_ADDREF(this, count, "nsJSPrincipals", sizeof(*this));
|
||||
|
|
@ -36,7 +36,7 @@ nsJSPrincipals::AddRef() {
|
|||
|
||||
NS_IMETHODIMP_(MozExternalRefCountType)
|
||||
nsJSPrincipals::Release() {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(0 != refcount, "dup release");
|
||||
nsrefcnt count = --refcount;
|
||||
NS_LOG_RELEASE(this, count, "nsJSPrincipals");
|
||||
|
|
|
|||
Loading…
Reference in a new issue