Bug 1352575 (part 15) - Remove PluginModuleChromeParent::mInitOnAsyncConnect. r=jimm.
This commit is contained in:
@@ -557,33 +557,6 @@ PluginModuleChromeParent::OnProcessLaunched(const bool aSucceeded)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (mInitOnAsyncConnect) {
|
|
||||||
mInitOnAsyncConnect = false;
|
|
||||||
NPError dummyError;
|
|
||||||
#if defined(XP_WIN)
|
|
||||||
mAsyncInitRv = NP_GetEntryPoints(mNPPIface,
|
|
||||||
&dummyError);
|
|
||||||
if (NS_SUCCEEDED(mAsyncInitRv))
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
|
|
||||||
mAsyncInitRv = NP_Initialize(mNPNIface,
|
|
||||||
mNPPIface,
|
|
||||||
&dummyError);
|
|
||||||
#else
|
|
||||||
mAsyncInitRv = NP_Initialize(mNPNIface,
|
|
||||||
&dummyError);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(XP_MACOSX)
|
|
||||||
if (NS_SUCCEEDED(mAsyncInitRv)) {
|
|
||||||
mAsyncInitRv = NP_GetEntryPoints(mNPPIface,
|
|
||||||
&dummyError);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef MOZ_GECKO_PROFILER
|
#ifdef MOZ_GECKO_PROFILER
|
||||||
Unused << SendInitProfiler(ProfilerParent::CreateForProcess(OtherPid()));
|
Unused << SendInitProfiler(ProfilerParent::CreateForProcess(OtherPid()));
|
||||||
#endif
|
#endif
|
||||||
@@ -692,7 +665,6 @@ PluginModuleChromeParent::PluginModuleChromeParent(const char* aFilePath,
|
|||||||
, mFlashProcess2(0)
|
, mFlashProcess2(0)
|
||||||
, mFinishInitTask(nullptr)
|
, mFinishInitTask(nullptr)
|
||||||
#endif
|
#endif
|
||||||
, mInitOnAsyncConnect(false)
|
|
||||||
, mAsyncInitRv(NS_ERROR_NOT_INITIALIZED)
|
, mAsyncInitRv(NS_ERROR_NOT_INITIALIZED)
|
||||||
{
|
{
|
||||||
NS_ASSERTION(mSubprocess, "Out of memory!");
|
NS_ASSERTION(mSubprocess, "Out of memory!");
|
||||||
@@ -2193,13 +2165,6 @@ PluginModuleChromeParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs*
|
|||||||
mNPNIface = bFuncs;
|
mNPNIface = bFuncs;
|
||||||
mNPPIface = pFuncs;
|
mNPPIface = pFuncs;
|
||||||
|
|
||||||
if (!mSubprocess->IsConnected()) {
|
|
||||||
// The subprocess isn't connected yet. Defer NP_Initialize until
|
|
||||||
// OnProcessLaunched is invoked.
|
|
||||||
mInitOnAsyncConnect = true;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
PluginSettings settings;
|
PluginSettings settings;
|
||||||
GetSettings(&settings);
|
GetSettings(&settings);
|
||||||
|
|
||||||
@@ -2262,21 +2227,6 @@ PluginModuleChromeParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error)
|
|||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
#if defined(XP_MACOSX)
|
|
||||||
if (!mSubprocess->IsConnected()) {
|
|
||||||
// The subprocess isn't connected yet. Defer NP_Initialize until
|
|
||||||
// OnProcessLaunched is invoked.
|
|
||||||
mInitOnAsyncConnect = true;
|
|
||||||
*error = NPERR_NO_ERROR;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (mInitOnAsyncConnect) {
|
|
||||||
*error = NPERR_NO_ERROR;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
PluginSettings settings;
|
PluginSettings settings;
|
||||||
GetSettings(&settings);
|
GetSettings(&settings);
|
||||||
|
|
||||||
@@ -2414,17 +2364,9 @@ PluginModuleParent::NP_GetEntryPoints(NPPluginFuncs* pFuncs, NPError* error)
|
|||||||
nsresult
|
nsresult
|
||||||
PluginModuleChromeParent::NP_GetEntryPoints(NPPluginFuncs* pFuncs, NPError* error)
|
PluginModuleChromeParent::NP_GetEntryPoints(NPPluginFuncs* pFuncs, NPError* error)
|
||||||
{
|
{
|
||||||
#if defined(XP_MACOSX)
|
#if !defined(XP_MACOSX)
|
||||||
if (mInitOnAsyncConnect) {
|
|
||||||
PluginAsyncSurrogate::NP_GetEntryPoints(pFuncs);
|
|
||||||
mNPPIface = pFuncs;
|
|
||||||
*error = NPERR_NO_ERROR;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (!mSubprocess->IsConnected()) {
|
if (!mSubprocess->IsConnected()) {
|
||||||
mNPPIface = pFuncs;
|
mNPPIface = pFuncs;
|
||||||
mInitOnAsyncConnect = true;
|
|
||||||
*error = NPERR_NO_ERROR;
|
*error = NPERR_NO_ERROR;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -661,7 +661,6 @@ private:
|
|||||||
|
|
||||||
friend class LaunchedTask;
|
friend class LaunchedTask;
|
||||||
|
|
||||||
bool mInitOnAsyncConnect;
|
|
||||||
nsresult mAsyncInitRv;
|
nsresult mAsyncInitRv;
|
||||||
nsCOMPtr<nsIObserver> mPluginOfflineObserver;
|
nsCOMPtr<nsIObserver> mPluginOfflineObserver;
|
||||||
bool mIsBlocklisted;
|
bool mIsBlocklisted;
|
||||||
|
|||||||
Reference in New Issue
Block a user