зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1344974 - Part 3: Speed up principal access checks in WrapperFactory::Rewrap() by eliminating virtual dispatch and inling; r=bholley
This commit is contained in:
Родитель
9b370e9857
Коммит
df3bce859e
|
@ -7,6 +7,7 @@
|
|||
#include "AccessCheck.h"
|
||||
|
||||
#include "nsJSPrincipals.h"
|
||||
#include "BasePrincipal.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
|
||||
#include "XPCWrapper.h"
|
||||
|
@ -47,7 +48,7 @@ AccessCheck::subsumes(JSCompartment* a, JSCompartment* b)
|
|||
{
|
||||
nsIPrincipal* aprin = GetCompartmentPrincipal(a);
|
||||
nsIPrincipal* bprin = GetCompartmentPrincipal(b);
|
||||
return aprin->Subsumes(bprin);
|
||||
return BasePrincipal::Cast(aprin)->FastSubsumes(bprin);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -63,7 +64,7 @@ AccessCheck::subsumesConsideringDomain(JSCompartment* a, JSCompartment* b)
|
|||
MOZ_ASSERT(OriginAttributes::IsRestrictOpenerAccessForFPI());
|
||||
nsIPrincipal* aprin = GetCompartmentPrincipal(a);
|
||||
nsIPrincipal* bprin = GetCompartmentPrincipal(b);
|
||||
return aprin->SubsumesConsideringDomain(bprin);
|
||||
return BasePrincipal::Cast(aprin)->FastSubsumesConsideringDomain(bprin);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -73,7 +74,7 @@ AccessCheck::subsumesConsideringDomainIgnoringFPD(JSCompartment* a,
|
|||
MOZ_ASSERT(!OriginAttributes::IsRestrictOpenerAccessForFPI());
|
||||
nsIPrincipal* aprin = GetCompartmentPrincipal(a);
|
||||
nsIPrincipal* bprin = GetCompartmentPrincipal(b);
|
||||
return aprin->SubsumesConsideringDomainIgnoringFPD(bprin);
|
||||
return BasePrincipal::Cast(aprin)->FastSubsumesConsideringDomainIgnoringFPD(bprin);
|
||||
}
|
||||
|
||||
// Does the compartment of the wrapper subsumes the compartment of the wrappee?
|
||||
|
|
|
@ -35,6 +35,7 @@ FINAL_LIBRARY = 'xul'
|
|||
LOCAL_INCLUDES += [
|
||||
'../../../dom/base',
|
||||
'../src',
|
||||
'/caps',
|
||||
]
|
||||
|
||||
if CONFIG['GNU_CXX']:
|
||||
|
|
Загрузка…
Ссылка в новой задаче