Bug 1198302 - Ensure that PluginAsyncSurrogate::NotifyAsyncInitFailed properly aborts any PluginAsyncSurrogate::WaitForInit calls. r=jimm, a=ritu
--- a/dom/plugins/ipc/PluginAsyncSurrogate.cpp
+++ b/dom/plugins/ipc/PluginAsyncSurrogate.cpp
@@ -560,16 +560,20 @@ PluginAsyncSurrogate::NotifyAsyncInitFai
// Clean up any pending NewStream requests
for (uint32_t i = 0, len = mPendingNewStreamCalls.Length(); i < len; ++i) {
PendingNewStreamCall& curPendingCall = mPendingNewStreamCalls[i];
DestroyAsyncStream(curPendingCall.mStream);
}
}
mPendingNewStreamCalls.Clear();
+ // Make sure that any WaitForInit calls on this surrogate will fail, or else
+ // we'll be perma-blocked
+ mInitCancelled = true;
+
nsNPAPIPluginInstance* inst =
static_cast<nsNPAPIPluginInstance*>(mInstance->ndata);
if (!inst) {
return;
}
nsPluginInstanceOwner* owner = inst->GetOwner();
MOZ_ASSERT(owner);
owner->NotifyHostAsyncInitFailed();