зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1817166 - Remove unused argument from nsContentUtils::TransferableToIPCTransferable; r=nika
After Bug 1781129, aChild is no longer needed to allocate Shmem, but aParent is still needed to grant access for file in https://searchfox.org/mozilla-central/rev/b579290e6b830d1b3f0a941203b0c0e1e56c42a3/dom/base/nsContentUtils.cpp#8171-8182. Differential Revision: https://phabricator.services.mozilla.com/D170063
This commit is contained in:
Родитель
a077161ff9
Коммит
3d5bc9089c
|
@ -7997,8 +7997,7 @@ nsresult nsContentUtils::IPCTransferableItemToVariant(
|
|||
|
||||
void nsContentUtils::TransferablesToIPCTransferables(
|
||||
nsIArray* aTransferables, nsTArray<IPCDataTransfer>& aIPC,
|
||||
bool aInSyncMessage, mozilla::dom::ContentChild* aChild,
|
||||
mozilla::dom::ContentParent* aParent) {
|
||||
bool aInSyncMessage, mozilla::dom::ContentParent* aParent) {
|
||||
aIPC.Clear();
|
||||
if (aTransferables) {
|
||||
uint32_t transferableCount = 0;
|
||||
|
@ -8007,8 +8006,7 @@ void nsContentUtils::TransferablesToIPCTransferables(
|
|||
IPCDataTransfer* dt = aIPC.AppendElement();
|
||||
nsCOMPtr<nsITransferable> transferable =
|
||||
do_QueryElementAt(aTransferables, i);
|
||||
TransferableToIPCTransferable(transferable, dt, aInSyncMessage, aChild,
|
||||
aParent);
|
||||
TransferableToIPCTransferable(transferable, dt, aInSyncMessage, aParent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8103,9 +8101,8 @@ static IPCDataTransferCString AsIPCDataTransferCString(
|
|||
|
||||
void nsContentUtils::TransferableToIPCTransferable(
|
||||
nsITransferable* aTransferable, IPCDataTransfer* aIPCDataTransfer,
|
||||
bool aInSyncMessage, mozilla::dom::ContentChild* aChild,
|
||||
mozilla::dom::ContentParent* aParent) {
|
||||
MOZ_ASSERT((aChild && !aParent) || (!aChild && aParent));
|
||||
bool aInSyncMessage, mozilla::dom::ContentParent* aParent) {
|
||||
MOZ_ASSERT_IF(XRE_IsParentProcess(), aParent);
|
||||
|
||||
if (aTransferable) {
|
||||
nsTArray<nsCString> flavorList;
|
||||
|
|
|
@ -2873,13 +2873,12 @@ class nsContentUtils {
|
|||
|
||||
static void TransferablesToIPCTransferables(
|
||||
nsIArray* aTransferables, nsTArray<mozilla::dom::IPCDataTransfer>& aIPC,
|
||||
bool aInSyncMessage, mozilla::dom::ContentChild* aChild,
|
||||
mozilla::dom::ContentParent* aParent);
|
||||
bool aInSyncMessage, mozilla::dom::ContentParent* aParent);
|
||||
|
||||
static void TransferableToIPCTransferable(
|
||||
nsITransferable* aTransferable,
|
||||
mozilla::dom::IPCDataTransfer* aIPCDataTransfer, bool aInSyncMessage,
|
||||
mozilla::dom::ContentChild* aChild, mozilla::dom::ContentParent* aParent);
|
||||
mozilla::dom::ContentParent* aParent);
|
||||
|
||||
/*
|
||||
* Get the pixel data from the given source surface and return it as a
|
||||
|
|
|
@ -6063,8 +6063,7 @@ nsresult EventStateManager::DoContentCommandEvent(
|
|||
nsCOMPtr<nsITransferable> transferable = aEvent->mTransferable;
|
||||
IPCDataTransfer ipcDataTransfer;
|
||||
nsContentUtils::TransferableToIPCTransferable(
|
||||
transferable, &ipcDataTransfer, false, nullptr,
|
||||
remote->Manager());
|
||||
transferable, &ipcDataTransfer, false, remote->Manager());
|
||||
bool isPrivateData = transferable->GetIsPrivateData();
|
||||
nsCOMPtr<nsIPrincipal> requestingPrincipal =
|
||||
transferable->GetRequestingPrincipal();
|
||||
|
|
|
@ -3544,7 +3544,7 @@ mozilla::ipc::IPCResult ContentParent::RecvGetClipboard(
|
|||
clipboard->GetData(trans, aWhichClipboard);
|
||||
|
||||
nsContentUtils::TransferableToIPCTransferable(
|
||||
trans, aDataTransfer, true /* aInSyncMessage */, nullptr, this);
|
||||
trans, aDataTransfer, true /* aInSyncMessage */, this);
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
|
@ -3626,8 +3626,7 @@ mozilla::ipc::IPCResult ContentParent::RecvGetClipboardAsync(
|
|||
GenericPromise::ResolveOrRejectValue&& aValue) {
|
||||
IPCDataTransfer ipcDataTransfer;
|
||||
nsContentUtils::TransferableToIPCTransferable(
|
||||
trans, &ipcDataTransfer, false /* aInSyncMessage */, nullptr,
|
||||
self);
|
||||
trans, &ipcDataTransfer, false /* aInSyncMessage */, self);
|
||||
aResolver(std::move(ipcDataTransfer));
|
||||
});
|
||||
return IPC_OK();
|
||||
|
@ -5438,7 +5437,7 @@ void ContentParent::MaybeInvokeDragSession(BrowserParent* aParent) {
|
|||
aParent ? aParent->GetLoadContext() : nullptr;
|
||||
nsCOMPtr<nsIArray> transferables = transfer->GetTransferables(lc);
|
||||
nsContentUtils::TransferablesToIPCTransferables(
|
||||
transferables, dataTransfers, false, nullptr, this);
|
||||
transferables, dataTransfers, false, this);
|
||||
uint32_t action;
|
||||
session->GetDragAction(&action);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ nsClipboardProxy::SetData(nsITransferable* aTransferable,
|
|||
|
||||
IPCDataTransfer ipcDataTransfer;
|
||||
nsContentUtils::TransferableToIPCTransferable(aTransferable, &ipcDataTransfer,
|
||||
false, child, nullptr);
|
||||
false, nullptr);
|
||||
|
||||
bool isPrivateData = aTransferable->GetIsPrivateData();
|
||||
nsCOMPtr<nsIPrincipal> requestingPrincipal =
|
||||
|
|
|
@ -36,7 +36,7 @@ nsresult nsDragServiceProxy::InvokeDragSessionImpl(
|
|||
NS_ENSURE_STATE(child);
|
||||
nsTArray<mozilla::dom::IPCDataTransfer> dataTransfers;
|
||||
nsContentUtils::TransferablesToIPCTransferables(
|
||||
aArrayTransferables, dataTransfers, false, child->Manager(), nullptr);
|
||||
aArrayTransferables, dataTransfers, false, nullptr);
|
||||
|
||||
nsCOMPtr<nsIPrincipal> principal;
|
||||
if (mSourceNode) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче