Bug 889480 - When NP_Initialize fails, we should not try to call NP_Shutdown later, r=gfritzsche

--HG--
extra : rebase_source : f55c38a81af16badbc27f3eaa82e7f8dbedd4d0c
This commit is contained in:
Benjamin Smedberg 2013-07-17 09:21:02 -04:00
parent ab4dba8a47
commit 333b953b24

View File

@ -1192,9 +1192,11 @@ PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs
uint32_t flags = 0;
if (!CallNP_Initialize(flags, error)) {
mShutdown = true;
return NS_ERROR_FAILURE;
}
else if (*error != NPERR_NO_ERROR) {
mShutdown = true;
return NS_OK;
}
@ -1220,8 +1222,14 @@ PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error)
flags |= kAllowAsyncDrawing;
#endif
if (!CallNP_Initialize(flags, error))
if (!CallNP_Initialize(flags, error)) {
mShutdown = true;
return NS_ERROR_FAILURE;
}
if (*error != NPERR_NO_ERROR) {
mShutdown = true;
return NS_OK;
}
#if defined XP_WIN
// Send the info needed to join the chrome process's audio session to the