mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 20:22:00 +00:00
Bug 1263235, part 2 - Make PContent::AsyncMessage and PContentBridge::AsyncMessage's data argument last. r=smaug
This commit is contained in:
parent
33947a1b40
commit
8fc2a0583c
@ -2029,8 +2029,8 @@ public:
|
|||||||
if (aCpows && !cc->GetCPOWManager()->Wrap(aCx, aCpows, &cpows)) {
|
if (aCpows && !cc->GetCPOWManager()->Wrap(aCx, aCpows, &cpows)) {
|
||||||
return NS_ERROR_UNEXPECTED;
|
return NS_ERROR_UNEXPECTED;
|
||||||
}
|
}
|
||||||
if (!cc->SendAsyncMessage(PromiseFlatString(aMessage), data, cpows,
|
if (!cc->SendAsyncMessage(PromiseFlatString(aMessage), cpows,
|
||||||
IPC::Principal(aPrincipal))) {
|
IPC::Principal(aPrincipal), data)) {
|
||||||
return NS_ERROR_UNEXPECTED;
|
return NS_ERROR_UNEXPECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,11 +60,11 @@ ContentBridgeChild::DeferredDestroy()
|
|||||||
|
|
||||||
bool
|
bool
|
||||||
ContentBridgeChild::RecvAsyncMessage(const nsString& aMsg,
|
ContentBridgeChild::RecvAsyncMessage(const nsString& aMsg,
|
||||||
const ClonedMessageData& aData,
|
|
||||||
InfallibleTArray<jsipc::CpowEntry>&& aCpows,
|
InfallibleTArray<jsipc::CpowEntry>&& aCpows,
|
||||||
const IPC::Principal& aPrincipal)
|
const IPC::Principal& aPrincipal,
|
||||||
|
const ClonedMessageData& aData)
|
||||||
{
|
{
|
||||||
return nsIContentChild::RecvAsyncMessage(aMsg, aData, Move(aCpows), aPrincipal);
|
return nsIContentChild::RecvAsyncMessage(aMsg, Move(aCpows), aPrincipal, aData);
|
||||||
}
|
}
|
||||||
|
|
||||||
PBlobChild*
|
PBlobChild*
|
||||||
|
@ -28,9 +28,9 @@ public:
|
|||||||
void DeferredDestroy();
|
void DeferredDestroy();
|
||||||
|
|
||||||
virtual bool RecvAsyncMessage(const nsString& aMsg,
|
virtual bool RecvAsyncMessage(const nsString& aMsg,
|
||||||
const ClonedMessageData& aData,
|
|
||||||
InfallibleTArray<jsipc::CpowEntry>&& aCpows,
|
InfallibleTArray<jsipc::CpowEntry>&& aCpows,
|
||||||
const IPC::Principal& aPrincipal) override;
|
const IPC::Principal& aPrincipal,
|
||||||
|
const ClonedMessageData& aData) override;
|
||||||
|
|
||||||
virtual PBlobChild*
|
virtual PBlobChild*
|
||||||
SendPBlobConstructor(PBlobChild* actor,
|
SendPBlobConstructor(PBlobChild* actor,
|
||||||
|
@ -84,12 +84,12 @@ ContentBridgeParent::RecvSyncMessage(const nsString& aMsg,
|
|||||||
|
|
||||||
bool
|
bool
|
||||||
ContentBridgeParent::RecvAsyncMessage(const nsString& aMsg,
|
ContentBridgeParent::RecvAsyncMessage(const nsString& aMsg,
|
||||||
const ClonedMessageData& aData,
|
|
||||||
InfallibleTArray<jsipc::CpowEntry>&& aCpows,
|
InfallibleTArray<jsipc::CpowEntry>&& aCpows,
|
||||||
const IPC::Principal& aPrincipal)
|
const IPC::Principal& aPrincipal,
|
||||||
|
const ClonedMessageData& aData)
|
||||||
{
|
{
|
||||||
return nsIContentParent::RecvAsyncMessage(aMsg, aData, Move(aCpows),
|
return nsIContentParent::RecvAsyncMessage(aMsg, Move(aCpows),
|
||||||
aPrincipal);
|
aPrincipal, aData);
|
||||||
}
|
}
|
||||||
|
|
||||||
PBlobParent*
|
PBlobParent*
|
||||||
|
@ -88,9 +88,9 @@ protected:
|
|||||||
nsTArray<StructuredCloneData>* aRetvals) override;
|
nsTArray<StructuredCloneData>* aRetvals) override;
|
||||||
|
|
||||||
virtual bool RecvAsyncMessage(const nsString& aMsg,
|
virtual bool RecvAsyncMessage(const nsString& aMsg,
|
||||||
const ClonedMessageData& aData,
|
|
||||||
InfallibleTArray<jsipc::CpowEntry>&& aCpows,
|
InfallibleTArray<jsipc::CpowEntry>&& aCpows,
|
||||||
const IPC::Principal& aPrincipal) override;
|
const IPC::Principal& aPrincipal,
|
||||||
|
const ClonedMessageData& aData) override;
|
||||||
|
|
||||||
virtual jsipc::PJavaScriptParent* AllocPJavaScriptParent() override;
|
virtual jsipc::PJavaScriptParent* AllocPJavaScriptParent() override;
|
||||||
|
|
||||||
|
@ -2441,9 +2441,9 @@ ContentChild::RecvLoadProcessScript(const nsString& aURL)
|
|||||||
|
|
||||||
bool
|
bool
|
||||||
ContentChild::RecvAsyncMessage(const nsString& aMsg,
|
ContentChild::RecvAsyncMessage(const nsString& aMsg,
|
||||||
const ClonedMessageData& aData,
|
|
||||||
InfallibleTArray<CpowEntry>&& aCpows,
|
InfallibleTArray<CpowEntry>&& aCpows,
|
||||||
const IPC::Principal& aPrincipal)
|
const IPC::Principal& aPrincipal,
|
||||||
|
const ClonedMessageData& aData)
|
||||||
{
|
{
|
||||||
RefPtr<nsFrameMessageManager> cpm =
|
RefPtr<nsFrameMessageManager> cpm =
|
||||||
nsFrameMessageManager::GetChildProcessManager();
|
nsFrameMessageManager::GetChildProcessManager();
|
||||||
|
@ -429,9 +429,9 @@ public:
|
|||||||
virtual bool RecvLoadProcessScript(const nsString& aURL) override;
|
virtual bool RecvLoadProcessScript(const nsString& aURL) override;
|
||||||
|
|
||||||
virtual bool RecvAsyncMessage(const nsString& aMsg,
|
virtual bool RecvAsyncMessage(const nsString& aMsg,
|
||||||
const ClonedMessageData& aData,
|
|
||||||
InfallibleTArray<CpowEntry>&& aCpows,
|
InfallibleTArray<CpowEntry>&& aCpows,
|
||||||
const IPC::Principal& aPrincipal) override;
|
const IPC::Principal& aPrincipal,
|
||||||
|
const ClonedMessageData& aData) override;
|
||||||
|
|
||||||
virtual bool RecvGeolocationUpdate(const GeoPosition& somewhere) override;
|
virtual bool RecvGeolocationUpdate(const GeoPosition& somewhere) override;
|
||||||
|
|
||||||
|
@ -4429,12 +4429,12 @@ ContentParent::RecvRpcMessage(const nsString& aMsg,
|
|||||||
|
|
||||||
bool
|
bool
|
||||||
ContentParent::RecvAsyncMessage(const nsString& aMsg,
|
ContentParent::RecvAsyncMessage(const nsString& aMsg,
|
||||||
const ClonedMessageData& aData,
|
|
||||||
InfallibleTArray<CpowEntry>&& aCpows,
|
InfallibleTArray<CpowEntry>&& aCpows,
|
||||||
const IPC::Principal& aPrincipal)
|
const IPC::Principal& aPrincipal,
|
||||||
|
const ClonedMessageData& aData)
|
||||||
{
|
{
|
||||||
return nsIContentParent::RecvAsyncMessage(aMsg, aData, Move(aCpows),
|
return nsIContentParent::RecvAsyncMessage(aMsg, Move(aCpows), aPrincipal,
|
||||||
aPrincipal);
|
aData);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
@ -4678,7 +4678,7 @@ ContentParent::DoSendAsyncMessage(JSContext* aCx,
|
|||||||
// Nuwa won't receive frame messages after it is frozen.
|
// Nuwa won't receive frame messages after it is frozen.
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
if (!SendAsyncMessage(nsString(aMessage), data, cpows, Principal(aPrincipal))) {
|
if (!SendAsyncMessage(nsString(aMessage), cpows, Principal(aPrincipal), data)) {
|
||||||
return NS_ERROR_UNEXPECTED;
|
return NS_ERROR_UNEXPECTED;
|
||||||
}
|
}
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -946,9 +946,9 @@ private:
|
|||||||
nsTArray<StructuredCloneData>* aRetvals) override;
|
nsTArray<StructuredCloneData>* aRetvals) override;
|
||||||
|
|
||||||
virtual bool RecvAsyncMessage(const nsString& aMsg,
|
virtual bool RecvAsyncMessage(const nsString& aMsg,
|
||||||
const ClonedMessageData& aData,
|
|
||||||
InfallibleTArray<CpowEntry>&& aCpows,
|
InfallibleTArray<CpowEntry>&& aCpows,
|
||||||
const IPC::Principal& aPrincipal) override;
|
const IPC::Principal& aPrincipal,
|
||||||
|
const ClonedMessageData& aData) override;
|
||||||
|
|
||||||
virtual bool RecvFilePathUpdateNotify(const nsString& aType,
|
virtual bool RecvFilePathUpdateNotify(const nsString& aType,
|
||||||
const nsString& aStorageName,
|
const nsString& aStorageName,
|
||||||
|
@ -1216,8 +1216,8 @@ parent:
|
|||||||
async NotifyBenchmarkResult(nsString aCodecName, uint32_t aDecodeFPS);
|
async NotifyBenchmarkResult(nsString aCodecName, uint32_t aDecodeFPS);
|
||||||
|
|
||||||
both:
|
both:
|
||||||
async AsyncMessage(nsString aMessage, ClonedMessageData aData,
|
async AsyncMessage(nsString aMessage, CpowEntry[] aCpows,
|
||||||
CpowEntry[] aCpows, Principal aPrincipal);
|
Principal aPrincipal, ClonedMessageData aData);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -51,8 +51,8 @@ both:
|
|||||||
|
|
||||||
async PBlob(BlobConstructorParams params);
|
async PBlob(BlobConstructorParams params);
|
||||||
|
|
||||||
async AsyncMessage(nsString aMessage, ClonedMessageData aData,
|
async AsyncMessage(nsString aMessage, CpowEntry[] aCpows,
|
||||||
CpowEntry[] aCpows, Principal aPrincipal);
|
Principal aPrincipal, ClonedMessageData aData);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -111,9 +111,9 @@ nsIContentChild::GetOrCreateActorForBlobImpl(BlobImpl* aImpl)
|
|||||||
|
|
||||||
bool
|
bool
|
||||||
nsIContentChild::RecvAsyncMessage(const nsString& aMsg,
|
nsIContentChild::RecvAsyncMessage(const nsString& aMsg,
|
||||||
const ClonedMessageData& aData,
|
|
||||||
InfallibleTArray<CpowEntry>&& aCpows,
|
InfallibleTArray<CpowEntry>&& aCpows,
|
||||||
const IPC::Principal& aPrincipal)
|
const IPC::Principal& aPrincipal,
|
||||||
|
const ClonedMessageData& aData)
|
||||||
{
|
{
|
||||||
RefPtr<nsFrameMessageManager> cpm = nsFrameMessageManager::GetChildProcessManager();
|
RefPtr<nsFrameMessageManager> cpm = nsFrameMessageManager::GetChildProcessManager();
|
||||||
if (cpm) {
|
if (cpm) {
|
||||||
|
@ -80,9 +80,9 @@ protected:
|
|||||||
virtual bool DeallocPBlobChild(PBlobChild* aActor);
|
virtual bool DeallocPBlobChild(PBlobChild* aActor);
|
||||||
|
|
||||||
virtual bool RecvAsyncMessage(const nsString& aMsg,
|
virtual bool RecvAsyncMessage(const nsString& aMsg,
|
||||||
const ClonedMessageData& aData,
|
|
||||||
InfallibleTArray<jsipc::CpowEntry>&& aCpows,
|
InfallibleTArray<jsipc::CpowEntry>&& aCpows,
|
||||||
const IPC::Principal& aPrincipal);
|
const IPC::Principal& aPrincipal,
|
||||||
|
const ClonedMessageData& aData);
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIContentChild, NS_ICONTENTCHILD_IID)
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsIContentChild, NS_ICONTENTCHILD_IID)
|
||||||
|
@ -269,9 +269,9 @@ nsIContentParent::RecvRpcMessage(const nsString& aMsg,
|
|||||||
|
|
||||||
bool
|
bool
|
||||||
nsIContentParent::RecvAsyncMessage(const nsString& aMsg,
|
nsIContentParent::RecvAsyncMessage(const nsString& aMsg,
|
||||||
const ClonedMessageData& aData,
|
|
||||||
InfallibleTArray<CpowEntry>&& aCpows,
|
InfallibleTArray<CpowEntry>&& aCpows,
|
||||||
const IPC::Principal& aPrincipal)
|
const IPC::Principal& aPrincipal,
|
||||||
|
const ClonedMessageData& aData)
|
||||||
{
|
{
|
||||||
// FIXME Permission check in Content process
|
// FIXME Permission check in Content process
|
||||||
nsIPrincipal* principal = aPrincipal;
|
nsIPrincipal* principal = aPrincipal;
|
||||||
|
@ -110,9 +110,9 @@ protected: // IPDL methods
|
|||||||
const IPC::Principal& aPrincipal,
|
const IPC::Principal& aPrincipal,
|
||||||
nsTArray<ipc::StructuredCloneData>* aRetvals);
|
nsTArray<ipc::StructuredCloneData>* aRetvals);
|
||||||
virtual bool RecvAsyncMessage(const nsString& aMsg,
|
virtual bool RecvAsyncMessage(const nsString& aMsg,
|
||||||
const ClonedMessageData& aData,
|
|
||||||
InfallibleTArray<jsipc::CpowEntry>&& aCpows,
|
InfallibleTArray<jsipc::CpowEntry>&& aCpows,
|
||||||
const IPC::Principal& aPrincipal);
|
const IPC::Principal& aPrincipal,
|
||||||
|
const ClonedMessageData& aData);
|
||||||
|
|
||||||
protected: // members
|
protected: // members
|
||||||
RefPtr<nsFrameMessageManager> mMessageManager;
|
RefPtr<nsFrameMessageManager> mMessageManager;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user