Bug 1352575 (part 11) - Remove LoadPluginResult and AssociatePluginId. r=jimm.

--HG--
extra : rebase_source : ecc5dd47ef1177abd947f331473a7436c97dad61
This commit is contained in:
Nicholas Nethercote 2017-04-18 16:56:44 +10:00
Родитель 8990926e77
Коммит 671542cfd3
5 изменённых файлов: 2 добавлений и 75 удалений

Просмотреть файл

@ -2772,29 +2772,6 @@ ContentChild::DeallocPOfflineCacheUpdateChild(POfflineCacheUpdateChild* actor)
return true;
}
mozilla::ipc::IPCResult
ContentChild::RecvLoadPluginResult(const uint32_t& aPluginId,
const bool& aResult)
{
nsresult rv;
Endpoint<PPluginModuleParent> endpoint;
bool finalResult = aResult &&
SendConnectPluginBridge(aPluginId, &rv, &endpoint) &&
NS_SUCCEEDED(rv);
plugins::PluginModuleContentParent::OnLoadPluginResult(aPluginId,
finalResult,
Move(endpoint));
return IPC_OK();
}
mozilla::ipc::IPCResult
ContentChild::RecvAssociatePluginId(const uint32_t& aPluginId,
const base::ProcessId& aProcessId)
{
plugins::PluginModuleContentParent::AssociatePluginId(aPluginId, aProcessId);
return IPC_OK();
}
mozilla::ipc::IPCResult
ContentChild::RecvDomainSetChanged(const uint32_t& aSetType,
const uint32_t& aChangeType,

Просмотреть файл

@ -438,12 +438,6 @@ public:
const nsCString& aTopic,
const nsString& aData) override;
virtual mozilla::ipc::IPCResult RecvAssociatePluginId(const uint32_t& aPluginId,
const base::ProcessId& aProcessId) override;
virtual mozilla::ipc::IPCResult RecvLoadPluginResult(const uint32_t& aPluginId,
const bool& aResult) override;
virtual mozilla::ipc::IPCResult RecvUpdateWindow(const uintptr_t& aChildId) override;
virtual mozilla::ipc::IPCResult RecvDomainSetChanged(const uint32_t& aSetType,

Просмотреть файл

@ -489,19 +489,6 @@ child:
*/
async NotifyIdleObserver(uint64_t observerId, nsCString topic, nsString str);
/**
* Called during plugin initialization to map a plugin id to a child process
* id.
*/
async AssociatePluginId(uint32_t aPluginId, ProcessId aProcessId);
/**
* This call is used by async plugin initialization to notify the
* PluginModuleContentParent that the PluginModuleChromeParent's async
* init has completed.
*/
async LoadPluginResult(uint32_t aPluginId, bool aResult);
async InvokeDragSession(IPCDataTransfer[] transfers, uint32_t action);
async EndDragSession(bool aDoneDrag, bool aUserCancelled,

Просмотреть файл

@ -198,9 +198,8 @@ private:
namespace {
/**
* Objects of this class remain linked until either an error occurs in the
* plugin initialization sequence, or until
* PluginModuleContentParent::OnLoadPluginResult has completed executing.
* Objects of this class remain linked until an error occurs in the
* plugin initialization sequence.
*/
class PluginModuleMapping : public PRCList
{
@ -445,15 +444,6 @@ PluginModuleContentParent::LoadModule(uint32_t aPluginId,
return parent;
}
/* static */ void
PluginModuleContentParent::AssociatePluginId(uint32_t aPluginId,
base::ProcessId aOtherPid)
{
DebugOnly<PluginModuleMapping*> mapping =
PluginModuleMapping::AssociateWithProcessId(aPluginId, aOtherPid);
MOZ_ASSERT(mapping);
}
/* static */ void
PluginModuleContentParent::Initialize(Endpoint<PPluginModuleParent>&& aEndpoint)
{
@ -481,21 +471,6 @@ PluginModuleContentParent::Initialize(Endpoint<PPluginModuleParent>&& aEndpoint)
moduleMapping.forget();
}
/* static */ void
PluginModuleContentParent::OnLoadPluginResult(const uint32_t& aPluginId,
const bool& aResult,
Endpoint<PPluginModuleParent>&& aEndpoint)
{
Initialize(Move(aEndpoint));
nsAutoPtr<PluginModuleMapping> moduleMapping(
PluginModuleMapping::FindModuleByPluginId(aPluginId));
MOZ_ASSERT(moduleMapping);
PluginModuleContentParent* parent = moduleMapping->GetModule();
MOZ_ASSERT(parent);
parent->RecvNP_InitializeResult(aResult ? NPERR_NO_ERROR
: NPERR_GENERIC_ERROR);
}
// static
PluginLibrary*
PluginModuleChromeParent::LoadModule(const char* aFilePath, uint32_t aPluginId,

Просмотреть файл

@ -379,12 +379,6 @@ class PluginModuleContentParent : public PluginModuleParent
static PluginLibrary* LoadModule(uint32_t aPluginId, nsPluginTag* aPluginTag);
static void OnLoadPluginResult(const uint32_t& aPluginId,
const bool& aResult,
Endpoint<PPluginModuleParent>&& aEndpoint);
static void AssociatePluginId(uint32_t aPluginId, base::ProcessId aProcessId);
virtual ~PluginModuleContentParent();
#if defined(XP_WIN) || defined(XP_MACOSX)