Bug 1109883 - Use urgent messages for protocol bridging (r=bent)
This commit is contained in:
@@ -927,7 +927,7 @@ ContentParent::RecvCreateChildProcess(const IPCTabContext& aContext,
|
||||
}
|
||||
|
||||
bool
|
||||
ContentParent::AnswerBridgeToChildProcess(const ContentParentId& aCpId)
|
||||
ContentParent::RecvBridgeToChildProcess(const ContentParentId& aCpId)
|
||||
{
|
||||
ContentProcessManager *cpm = ContentProcessManager::GetSingleton();
|
||||
ContentParent* cp = cpm->GetContentProcessById(aCpId);
|
||||
@@ -966,7 +966,7 @@ static nsIDocShell* GetOpenerDocShellHelper(Element* aFrameElement)
|
||||
}
|
||||
|
||||
bool
|
||||
ContentParent::AnswerLoadPlugin(const uint32_t& aPluginId)
|
||||
ContentParent::RecvLoadPlugin(const uint32_t& aPluginId)
|
||||
{
|
||||
return mozilla::plugins::SetupBridge(aPluginId, this);
|
||||
}
|
||||
@@ -1219,7 +1219,7 @@ ContentParent::CreateContentBridgeParent(const TabContext& aContext,
|
||||
if (cpId == 0) {
|
||||
return nullptr;
|
||||
}
|
||||
if (!child->CallBridgeToChildProcess(cpId)) {
|
||||
if (!child->SendBridgeToChildProcess(cpId)) {
|
||||
return nullptr;
|
||||
}
|
||||
ContentBridgeParent* parent = child->GetLastBridge();
|
||||
|
||||
@@ -150,9 +150,9 @@ public:
|
||||
bool* aIsForApp,
|
||||
bool* aIsForBrowser,
|
||||
TabId* aTabId) MOZ_OVERRIDE;
|
||||
virtual bool AnswerBridgeToChildProcess(const ContentParentId& aCpId) MOZ_OVERRIDE;
|
||||
virtual bool RecvBridgeToChildProcess(const ContentParentId& aCpId) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool AnswerLoadPlugin(const uint32_t& aPluginId) MOZ_OVERRIDE;
|
||||
virtual bool RecvLoadPlugin(const uint32_t& aPluginId) MOZ_OVERRIDE;
|
||||
virtual bool RecvFindPlugins(const uint32_t& aPluginEpoch,
|
||||
nsTArray<PluginTag>* aPlugins,
|
||||
uint32_t* aNewPluginEpoch) MOZ_OVERRIDE;
|
||||
|
||||
@@ -557,7 +557,7 @@ parent:
|
||||
ProcessPriority priority,
|
||||
TabId openerTabId)
|
||||
returns (ContentParentId cpId, bool isForApp, bool isForBrowser, TabId tabId);
|
||||
intr BridgeToChildProcess(ContentParentId cpId);
|
||||
sync BridgeToChildProcess(ContentParentId cpId);
|
||||
|
||||
/**
|
||||
* This call connects the content process to a plugin process. While this
|
||||
@@ -566,7 +566,7 @@ parent:
|
||||
* process. We use intr semantics here to ensure that the PluginModuleParent
|
||||
* allocation message is dispatched before LoadPlugin returns.
|
||||
*/
|
||||
intr LoadPlugin(uint32_t pluginId);
|
||||
sync LoadPlugin(uint32_t pluginId);
|
||||
|
||||
/**
|
||||
* This call returns the set of plugins loaded in the chrome
|
||||
|
||||
@@ -115,7 +115,7 @@ PluginModuleContentParent::LoadModule(uint32_t aPluginId)
|
||||
* sSavedModuleParent. We fetch it from there after LoadPlugin finishes.
|
||||
*/
|
||||
dom::ContentChild* cp = dom::ContentChild::GetSingleton();
|
||||
if (!cp->CallLoadPlugin(aPluginId)) {
|
||||
if (!cp->SendLoadPlugin(aPluginId)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,10 +79,11 @@ class ChannelOpened : public IPC::Message
|
||||
public:
|
||||
ChannelOpened(TransportDescriptor aDescriptor,
|
||||
ProcessId aOtherProcess,
|
||||
ProtocolId aProtocol)
|
||||
ProtocolId aProtocol,
|
||||
PriorityValue aPriority = PRIORITY_NORMAL)
|
||||
: IPC::Message(MSG_ROUTING_CONTROL, // these only go to top-level actors
|
||||
CHANNEL_OPENED_MESSAGE_TYPE,
|
||||
PRIORITY_NORMAL)
|
||||
aPriority)
|
||||
{
|
||||
IPC::WriteParam(this, aDescriptor);
|
||||
IPC::WriteParam(this, aOtherProcess);
|
||||
@@ -125,10 +126,12 @@ Bridge(const PrivateIPDLInterface&,
|
||||
|
||||
if (!aParentChannel->Send(new ChannelOpened(parentSide,
|
||||
childId,
|
||||
aProtocol)) ||
|
||||
aProtocol,
|
||||
IPC::Message::PRIORITY_URGENT)) ||
|
||||
!aChildChannel->Send(new ChannelOpened(childSide,
|
||||
parentId,
|
||||
aChildProtocol))) {
|
||||
aChildProtocol,
|
||||
IPC::Message::PRIORITY_URGENT))) {
|
||||
CloseDescriptor(parentSide);
|
||||
CloseDescriptor(childSide);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user