@@ -2386,51 +2386,6 @@ PluginModuleChild::AnswerSyncNPP_New(PPluginInstanceChild* aActor, NPError* rv)
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
class AsyncNewResultSender : public ChildAsyncCall
|
||||
{
|
||||
public:
|
||||
AsyncNewResultSender(PluginInstanceChild* aInstance, NPError aResult)
|
||||
: ChildAsyncCall(aInstance, nullptr, nullptr)
|
||||
, mResult(aResult)
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHOD Run() override
|
||||
{
|
||||
RemoveFromAsyncList();
|
||||
DebugOnly<bool> sendOk = mInstance->SendAsyncNPP_NewResult(mResult);
|
||||
MOZ_ASSERT(sendOk);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
private:
|
||||
NPError mResult;
|
||||
};
|
||||
|
||||
static void
|
||||
RunAsyncNPP_New(void* aChildInstance)
|
||||
{
|
||||
MOZ_ASSERT(aChildInstance);
|
||||
PluginInstanceChild* childInstance =
|
||||
static_cast<PluginInstanceChild*>(aChildInstance);
|
||||
NPError rv = childInstance->DoNPP_New();
|
||||
RefPtr<AsyncNewResultSender> task =
|
||||
new AsyncNewResultSender(childInstance, rv);
|
||||
childInstance->PostChildAsyncCall(task.forget());
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
PluginModuleChild::RecvAsyncNPP_New(PPluginInstanceChild* aActor)
|
||||
{
|
||||
PLUGIN_LOG_DEBUG_METHOD;
|
||||
PluginInstanceChild* childInstance =
|
||||
reinterpret_cast<PluginInstanceChild*>(aActor);
|
||||
AssertPluginThread();
|
||||
// We don't want to run NPP_New async from within nested calls
|
||||
childInstance->AsyncCall(&RunAsyncNPP_New, childInstance);
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
bool
|
||||
PluginModuleChild::DeallocPPluginInstanceChild(PPluginInstanceChild* aActor)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user