Bug 1464374 part 5 - Use GetRealmPrincipals in AsmJSCacheOpenEntryFor{Read,Write}. r=luke

This commit is contained in:
Jan de Mooij 2018-05-31 11:28:49 +02:00
Родитель 08cef83f24
Коммит 1c0105d7ef
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -2563,7 +2563,7 @@ AsmJSCacheOpenEntryForRead(JS::Handle<JSObject*> aGlobal,
intptr_t *aHandle)
{
nsIPrincipal* principal =
nsJSPrincipals::get(JS_GetCompartmentPrincipals(js::GetObjectCompartment(aGlobal)));
nsJSPrincipals::get(JS::GetRealmPrincipals(js::GetNonCCWObjectRealm(aGlobal)));
return asmjscache::OpenEntryForRead(principal, aBegin, aLimit, aSize, aMemory,
aHandle);
}
@ -2577,7 +2577,7 @@ AsmJSCacheOpenEntryForWrite(JS::Handle<JSObject*> aGlobal,
intptr_t* aHandle)
{
nsIPrincipal* principal =
nsJSPrincipals::get(JS_GetCompartmentPrincipals(js::GetObjectCompartment(aGlobal)));
nsJSPrincipals::get(JS::GetRealmPrincipals(js::GetNonCCWObjectRealm(aGlobal)));
return asmjscache::OpenEntryForWrite(principal, aBegin, aEnd, aSize, aMemory,
aHandle);
}