Bug 1184068: Ensure that mShutdown is not incorrectly set from true to false if plugin crashes during CallNP_Shutdown; r=jimm

This commit is contained in:
Aaron Klotz 2015-07-22 17:39:32 -06:00
parent 0bc1227deb
commit 8bc79d9743

View File

@ -2412,7 +2412,10 @@ PluginModuleParent::DoShutdown(NPError* error)
// CallNP_Shutdown() message
Close();
mShutdown = ok;
// mShutdown should either be initialized to false, or be transitiong from
// false to true. It is never ok to go from true to false. Using OR for
// the following assignment to ensure this.
mShutdown |= ok;
if (!ok) {
*error = NPERR_GENERIC_ERROR;
}