зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1459562 - Transmit the permissions of the owning principal together with the blobURL when broadcasted to content processes, r=nika
This commit is contained in:
Родитель
fbe8c3a8fd
Коммит
187183debd
|
@ -2467,6 +2467,11 @@ ContentParent::InitInternal(ProcessPriority aInitialPriority)
|
|||
nsTArray<BlobURLRegistrationData> registrations;
|
||||
if (nsHostObjectProtocolHandler::GetAllBlobURLEntries(registrations,
|
||||
this)) {
|
||||
for (const BlobURLRegistrationData& registration : registrations) {
|
||||
rv = TransmitPermissionsForPrincipal(registration.principal());
|
||||
Unused << NS_WARN_IF(NS_FAILED(rv));
|
||||
}
|
||||
|
||||
Unused << SendInitBlobURLs(registrations);
|
||||
}
|
||||
}
|
||||
|
@ -5147,8 +5152,13 @@ ContentParent::BroadcastBlobURLRegistration(const nsACString& aURI,
|
|||
|
||||
for (auto* cp : AllProcesses(eLive)) {
|
||||
if (cp != aIgnoreThisCP) {
|
||||
nsresult rv = cp->TransmitPermissionsForPrincipal(principal);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
break;
|
||||
}
|
||||
|
||||
IPCBlob ipcBlob;
|
||||
nsresult rv = IPCBlobUtils::Serialize(aBlobImpl, cp, ipcBlob);
|
||||
rv = IPCBlobUtils::Serialize(aBlobImpl, cp, ipcBlob);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
break;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче