Bug 1352575 (part 5) - Remove PluginModuleParent::mIsStartingAsync. r=jimm.

This allows a bunch of other things to be removed too, including
PluginModuleParent::mSurrogateInstances,
PluginModuleChromeParent::sInstantiated, and NS_PLUGIN_INIT_PENDING.

The patch also removes the AsyncPluginInit crash annotation.
This commit is contained in:
Nicholas Nethercote
2017-04-18 16:56:43 +10:00
parent 8feeffcee0
commit e20e423748
10 changed files with 33 additions and 265 deletions

View File

@@ -1775,22 +1775,12 @@ PluginInstanceParent::NPP_NewStream(NPMIMEType type, NPStream* stream,
timer(Module()->GetHistogramKey());
NPError err = NPERR_NO_ERROR;
if (mParent->IsStartingAsync()) {
MOZ_ASSERT(mSurrogate);
mSurrogate->AsyncCallDeparting();
if (SendAsyncNPP_NewStream(bs, NullableString(type), seekable)) {
*stype = nsPluginStreamListenerPeer::STREAM_TYPE_UNKNOWN;
} else {
err = NPERR_GENERIC_ERROR;
}
} else {
bs->SetAlive();
if (!CallNPP_NewStream(bs, NullableString(type), seekable, &err, stype)) {
err = NPERR_GENERIC_ERROR;
}
if (NPERR_NO_ERROR != err) {
Unused << PBrowserStreamParent::Send__delete__(bs);
}
bs->SetAlive();
if (!CallNPP_NewStream(bs, NullableString(type), seekable, &err, stype)) {
err = NPERR_GENERIC_ERROR;
}
if (NPERR_NO_ERROR != err) {
Unused << PBrowserStreamParent::Send__delete__(bs);
}
return err;