Bug 792652 - Remove methods from MessageListener (r=dvander)

With this change, MessageChannel stores mListener as an IToplevelProtocol
rather than a MessageListener (which isn't really a useful concept on
its own). The MessageListener methods are split out to IProtocol and
IToplevelProtocol. MessageListener gets deleted. Some of the inline
functions in MessageChannel had to be moved to MessageChannel.cpp since
IToplevelProtocol isn't defined in MessageChannel.h.
This commit is contained in:
Bill McCloskey
2016-10-30 11:26:40 -07:00
parent 002d1a2d5a
commit 6d64f5c796
8 changed files with 142 additions and 137 deletions

View File

@@ -1036,8 +1036,7 @@ PluginInstanceParent*
PluginModuleChromeParent::GetManagingInstance(mozilla::ipc::IProtocol* aProtocol)
{
MOZ_ASSERT(aProtocol);
mozilla::ipc::MessageListener* listener =
static_cast<mozilla::ipc::MessageListener*>(aProtocol);
mozilla::ipc::IProtocol* listener = aProtocol;
switch (listener->GetProtocolTypeId()) {
case PPluginInstanceMsgStart:
// In this case, aProtocol is the instance itself. Just cast it.