Bug 700583 - Null-check our way out of crashes on both mobile and desktop in pr_FindSymbolInLib caused by plugin code where the plugin fails to load correctly, r=josh

This commit is contained in:
Benjamin Smedberg
2012-08-21 14:38:51 -04:00
parent 8405257289
commit a0049a456e
2 changed files with 7 additions and 2 deletions

View File

@@ -182,8 +182,9 @@ PluginModuleChild::Init(const std::string& aPluginFilename,
if (!mLibrary)
#endif
{
DebugOnly<nsresult> rv = pluginFile.LoadPlugin(&mLibrary);
NS_ASSERTION(NS_OK == rv, "trouble with mPluginFile");
nsresult rv = pluginFile.LoadPlugin(&mLibrary);
if (NS_FAILED(rv))
return false;
}
NS_ASSERTION(mLibrary, "couldn't open shared object");