mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1140683: Fix async plugin init using null plugin funcs on MacOSX; r=jimm
This commit is contained in:
parent
bd9f68ac70
commit
d55b7850b6
@ -1544,6 +1544,8 @@ PluginModuleParent::DeallocPPluginInstanceParent(PPluginInstanceParent* aActor)
|
||||
void
|
||||
PluginModuleParent::SetPluginFuncs(NPPluginFuncs* aFuncs)
|
||||
{
|
||||
MOZ_ASSERT(aFuncs);
|
||||
|
||||
aFuncs->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;
|
||||
aFuncs->javaClass = nullptr;
|
||||
|
||||
@ -2179,7 +2181,7 @@ PluginModuleParent::RecvNP_InitializeResult(const NPError& aError)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mIsStartingAsync) {
|
||||
if (mIsStartingAsync && mNPPIface) {
|
||||
SetPluginFuncs(mNPPIface);
|
||||
InitAsyncSurrogates();
|
||||
}
|
||||
@ -2301,8 +2303,17 @@ PluginModuleParent::NP_GetEntryPoints(NPPluginFuncs* pFuncs, NPError* error)
|
||||
|
||||
*error = NPERR_NO_ERROR;
|
||||
if (mIsStartingAsync && !IsChrome()) {
|
||||
PluginAsyncSurrogate::NP_GetEntryPoints(pFuncs);
|
||||
mNPPIface = pFuncs;
|
||||
#if defined(XP_MACOSX)
|
||||
if (mNPInitialized) {
|
||||
SetPluginFuncs(pFuncs);
|
||||
InitAsyncSurrogates();
|
||||
} else {
|
||||
PluginAsyncSurrogate::NP_GetEntryPoints(pFuncs);
|
||||
}
|
||||
#else
|
||||
PluginAsyncSurrogate::NP_GetEntryPoints(pFuncs);
|
||||
#endif
|
||||
} else {
|
||||
SetPluginFuncs(pFuncs);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user