Bug 1123461 - Rename CpowIdHolder to CrossProcessCpowHolder (r=dvander)

This commit is contained in:
Bill McCloskey 2015-01-26 13:32:31 -08:00
parent 411974faf9
commit 144291b5ce
7 changed files with 15 additions and 13 deletions

View File

@ -1910,7 +1910,7 @@ ContentChild::RecvAsyncMessage(const nsString& aMsg,
nsRefPtr<nsFrameMessageManager> cpm = nsFrameMessageManager::sChildProcessManager;
if (cpm) {
StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForChild(aData);
CpowIdHolder cpows(this, aCpows);
CrossProcessCpowHolder cpows(this, aCpows);
cpm->ReceiveMessage(static_cast<nsIContentFrameMessageManager*>(cpm.get()),
aMsg, false, &cloneData, &cpows, aPrincipal, nullptr);
}

View File

@ -3008,7 +3008,7 @@ TabChild::RecvAsyncMessage(const nsString& aMessage,
StructuredCloneData cloneData = UnpackClonedMessageDataForChild(aData);
nsRefPtr<nsFrameMessageManager> mm =
static_cast<nsFrameMessageManager*>(mTabChildGlobal->mMessageManager.get());
CpowIdHolder cpows(Manager(), aCpows);
CrossProcessCpowHolder cpows(Manager(), aCpows);
mm->ReceiveMessage(static_cast<EventTarget*>(mTabChildGlobal),
aMessage, false, &cloneData, &cpows, aPrincipal, nullptr);
}

View File

@ -1348,7 +1348,7 @@ TabParent::RecvSyncMessage(const nsString& aMessage,
}
StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData);
CpowIdHolder cpows(Manager(), aCpows);
CrossProcessCpowHolder cpows(Manager(), aCpows);
return ReceiveMessage(aMessage, true, &cloneData, &cpows, aPrincipal, aJSONRetVal);
}
@ -1370,7 +1370,7 @@ TabParent::RecvRpcMessage(const nsString& aMessage,
}
StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData);
CpowIdHolder cpows(Manager(), aCpows);
CrossProcessCpowHolder cpows(Manager(), aCpows);
return ReceiveMessage(aMessage, true, &cloneData, &cpows, aPrincipal, aJSONRetVal);
}
@ -1391,7 +1391,7 @@ TabParent::RecvAsyncMessage(const nsString& aMessage,
}
StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData);
CpowIdHolder cpows(Manager(), aCpows);
CrossProcessCpowHolder cpows(Manager(), aCpows);
return ReceiveMessage(aMessage, false, &cloneData, &cpows, aPrincipal, nullptr);
}

View File

@ -116,7 +116,7 @@ nsIContentChild::RecvAsyncMessage(const nsString& aMsg,
nsRefPtr<nsFrameMessageManager> cpm = nsFrameMessageManager::sChildProcessManager;
if (cpm) {
StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForChild(aData);
CpowIdHolder cpows(this, aCpows);
CrossProcessCpowHolder cpows(this, aCpows);
cpm->ReceiveMessage(static_cast<nsIContentFrameMessageManager*>(cpm.get()),
aMsg, false, &cloneData, &cpows, aPrincipal, nullptr);
}

View File

@ -193,7 +193,7 @@ nsIContentParent::RecvSyncMessage(const nsString& aMsg,
nsRefPtr<nsFrameMessageManager> ppm = mMessageManager;
if (ppm) {
StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData);
CpowIdHolder cpows(this, aCpows);
CrossProcessCpowHolder cpows(this, aCpows);
ppm->ReceiveMessage(static_cast<nsIContentFrameMessageManager*>(ppm.get()),
aMsg, true, &cloneData, &cpows, aPrincipal, aRetvals);
}
@ -220,7 +220,7 @@ nsIContentParent::RecvRpcMessage(const nsString& aMsg,
nsRefPtr<nsFrameMessageManager> ppm = mMessageManager;
if (ppm) {
StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData);
CpowIdHolder cpows(this, aCpows);
CrossProcessCpowHolder cpows(this, aCpows);
ppm->ReceiveMessage(static_cast<nsIContentFrameMessageManager*>(ppm.get()),
aMsg, true, &cloneData, &cpows, aPrincipal, aRetvals);
}
@ -246,7 +246,7 @@ nsIContentParent::RecvAsyncMessage(const nsString& aMsg,
nsRefPtr<nsFrameMessageManager> ppm = mMessageManager;
if (ppm) {
StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData);
CpowIdHolder cpows(this, aCpows);
CrossProcessCpowHolder cpows(this, aCpows);
ppm->ReceiveMessage(static_cast<nsIContentFrameMessageManager*>(ppm.get()),
aMsg, false, &cloneData, &cpows, aPrincipal, nullptr);
}

View File

@ -43,10 +43,11 @@ class CPOWManager
InfallibleTArray<CpowEntry> *outCpows) = 0;
};
class CpowIdHolder : public CpowHolder
class CrossProcessCpowHolder : public CpowHolder
{
public:
CpowIdHolder(dom::CPOWManagerGetter *managerGetter, const InfallibleTArray<CpowEntry> &cpows);
CrossProcessCpowHolder(dom::CPOWManagerGetter *managerGetter,
const InfallibleTArray<CpowEntry> &cpows);
bool ToObject(JSContext *cx, JS::MutableHandleObject objp);

View File

@ -672,7 +672,8 @@ JavaScriptShared::fromObjectOrNullVariant(JSContext *cx, ObjectOrNullVariant obj
return fromObjectVariant(cx, objVar.get_ObjectVariant());
}
CpowIdHolder::CpowIdHolder(dom::CPOWManagerGetter *managerGetter, const InfallibleTArray<CpowEntry> &cpows)
CrossProcessCpowHolder::CrossProcessCpowHolder(dom::CPOWManagerGetter *managerGetter,
const InfallibleTArray<CpowEntry> &cpows)
: js_(nullptr),
cpows_(cpows)
{
@ -682,7 +683,7 @@ CpowIdHolder::CpowIdHolder(dom::CPOWManagerGetter *managerGetter, const Infallib
}
bool
CpowIdHolder::ToObject(JSContext *cx, JS::MutableHandleObject objp)
CrossProcessCpowHolder::ToObject(JSContext *cx, JS::MutableHandleObject objp)
{
if (!cpows_.Length())
return true;