Bug 1352575 (part 10) - Remove PluginModuleChromeParent::mContentParent. r=jimm.
This commit is contained in:
@@ -496,13 +496,6 @@ PluginModuleContentParent::OnLoadPluginResult(const uint32_t& aPluginId,
|
|||||||
: NPERR_GENERIC_ERROR);
|
: NPERR_GENERIC_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
PluginModuleChromeParent::SendAssociatePluginId()
|
|
||||||
{
|
|
||||||
MOZ_ASSERT(mContentParent);
|
|
||||||
return mContentParent->SendAssociatePluginId(mPluginId, OtherPid());
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
PluginLibrary*
|
PluginLibrary*
|
||||||
PluginModuleChromeParent::LoadModule(const char* aFilePath, uint32_t aPluginId,
|
PluginModuleChromeParent::LoadModule(const char* aFilePath, uint32_t aPluginId,
|
||||||
@@ -726,7 +719,6 @@ PluginModuleChromeParent::PluginModuleChromeParent(const char* aFilePath,
|
|||||||
#endif
|
#endif
|
||||||
, mInitOnAsyncConnect(false)
|
, mInitOnAsyncConnect(false)
|
||||||
, mAsyncInitRv(NS_ERROR_NOT_INITIALIZED)
|
, mAsyncInitRv(NS_ERROR_NOT_INITIALIZED)
|
||||||
, mContentParent(nullptr)
|
|
||||||
{
|
{
|
||||||
NS_ASSERTION(mSubprocess, "Out of memory!");
|
NS_ASSERTION(mSubprocess, "Out of memory!");
|
||||||
mSandboxLevel = aSandboxLevel;
|
mSandboxLevel = aSandboxLevel;
|
||||||
@@ -2323,21 +2315,8 @@ PluginModuleParent::RecvNP_InitializeResult(const NPError& aError)
|
|||||||
mozilla::ipc::IPCResult
|
mozilla::ipc::IPCResult
|
||||||
PluginModuleChromeParent::RecvNP_InitializeResult(const NPError& aError)
|
PluginModuleChromeParent::RecvNP_InitializeResult(const NPError& aError)
|
||||||
{
|
{
|
||||||
if (!mContentParent) {
|
|
||||||
return PluginModuleParent::RecvNP_InitializeResult(aError);
|
return PluginModuleParent::RecvNP_InitializeResult(aError);
|
||||||
}
|
}
|
||||||
bool initOk = aError == NPERR_NO_ERROR;
|
|
||||||
if (initOk) {
|
|
||||||
SetPluginFuncs(mNPPIface);
|
|
||||||
}
|
|
||||||
mNPInitialized = initOk;
|
|
||||||
bool result = mContentParent->SendLoadPluginResult(mPluginId, initOk);
|
|
||||||
mContentParent = nullptr;
|
|
||||||
if (!result) {
|
|
||||||
return IPC_FAIL_NO_REASON(this);
|
|
||||||
}
|
|
||||||
return IPC_OK();
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@@ -2420,17 +2399,11 @@ mozilla::ipc::IPCResult
|
|||||||
PluginModuleChromeParent::RecvNP_InitializeResult(const NPError& aError)
|
PluginModuleChromeParent::RecvNP_InitializeResult(const NPError& aError)
|
||||||
{
|
{
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
if (mContentParent) {
|
if (aError == NPERR_NO_ERROR) {
|
||||||
if ((ok = SendAssociatePluginId())) {
|
|
||||||
ok = mContentParent->SendLoadPluginResult(mPluginId,
|
|
||||||
aError == NPERR_NO_ERROR);
|
|
||||||
mContentParent = nullptr;
|
|
||||||
}
|
|
||||||
} else if (aError == NPERR_NO_ERROR) {
|
|
||||||
// Initialization steps for (e10s && !asyncInit) || !e10s
|
// Initialization steps for (e10s && !asyncInit) || !e10s
|
||||||
#if defined XP_WIN
|
#if defined XP_WIN
|
||||||
// Send the info needed to join the browser process's audio session to the
|
// Send the info needed to join the browser process's audio session to
|
||||||
// plugin process.
|
// the plugin process.
|
||||||
nsID id;
|
nsID id;
|
||||||
nsString sessionName;
|
nsString sessionName;
|
||||||
nsString iconPath;
|
nsString iconPath;
|
||||||
|
|||||||
@@ -525,9 +525,6 @@ class PluginModuleChromeParent
|
|||||||
virtual mozilla::ipc::IPCResult
|
virtual mozilla::ipc::IPCResult
|
||||||
RecvNP_InitializeResult(const NPError& aError) override;
|
RecvNP_InitializeResult(const NPError& aError) override;
|
||||||
|
|
||||||
bool
|
|
||||||
SendAssociatePluginId();
|
|
||||||
|
|
||||||
void CachedSettingChanged();
|
void CachedSettingChanged();
|
||||||
|
|
||||||
virtual mozilla::ipc::IPCResult
|
virtual mozilla::ipc::IPCResult
|
||||||
@@ -679,11 +676,6 @@ private:
|
|||||||
|
|
||||||
bool mInitOnAsyncConnect;
|
bool mInitOnAsyncConnect;
|
||||||
nsresult mAsyncInitRv;
|
nsresult mAsyncInitRv;
|
||||||
// mContentParent is to be used ONLY during the IPC dance that occurs
|
|
||||||
// when ContentParent::RecvLoadPlugin is called under async plugin init!
|
|
||||||
// In other contexts it is *unsafe*, as there might be multiple content
|
|
||||||
// processes in existence!
|
|
||||||
dom::ContentParent* mContentParent;
|
|
||||||
nsCOMPtr<nsIObserver> mPluginOfflineObserver;
|
nsCOMPtr<nsIObserver> mPluginOfflineObserver;
|
||||||
bool mIsBlocklisted;
|
bool mIsBlocklisted;
|
||||||
#if defined(XP_WIN) && defined(MOZ_SANDBOX)
|
#if defined(XP_WIN) && defined(MOZ_SANDBOX)
|
||||||
|
|||||||
Reference in New Issue
Block a user