mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 889480 - When NP_Initialize fails, we should not try to call NP_Shutdown later, r=gfritzsche
--HG-- extra : rebase_source : d6749449a9ef910b65336ce69aa0ad558711f6e7
This commit is contained in:
parent
4adfeb412d
commit
f789c0245d
@ -1192,9 +1192,11 @@ PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs
|
|||||||
uint32_t flags = 0;
|
uint32_t flags = 0;
|
||||||
|
|
||||||
if (!CallNP_Initialize(flags, error)) {
|
if (!CallNP_Initialize(flags, error)) {
|
||||||
|
mShutdown = true;
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
else if (*error != NPERR_NO_ERROR) {
|
else if (*error != NPERR_NO_ERROR) {
|
||||||
|
mShutdown = true;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1220,8 +1222,14 @@ PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error)
|
|||||||
flags |= kAllowAsyncDrawing;
|
flags |= kAllowAsyncDrawing;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!CallNP_Initialize(flags, error))
|
if (!CallNP_Initialize(flags, error)) {
|
||||||
|
mShutdown = true;
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
}
|
||||||
|
if (*error != NPERR_NO_ERROR) {
|
||||||
|
mShutdown = true;
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined XP_WIN
|
#if defined XP_WIN
|
||||||
// Send the info needed to join the chrome process's audio session to the
|
// Send the info needed to join the chrome process's audio session to the
|
||||||
|
Loading…
Reference in New Issue
Block a user