Bug 1172396 - Make GMP initialisation synchronous - r=cpearce

This commit is contained in:
Edwin Flores 2015-09-01 17:31:48 +12:00
parent 72e6aa700d
commit bd3f1b7fed
4 changed files with 5 additions and 8 deletions

View File

@ -433,7 +433,7 @@ GMPChild::GetUTF8LibPath(nsACString& aOutLibPath)
}
bool
GMPChild::RecvStartPlugin()
GMPChild::AnswerStartPlugin()
{
LOGD("%s", __FUNCTION__);

View File

@ -56,7 +56,7 @@ private:
bool GetUTF8LibPath(nsACString& aOutLibPath);
virtual bool RecvSetNodeId(const nsCString& aNodeId) override;
virtual bool RecvStartPlugin() override;
virtual bool AnswerStartPlugin() override;
virtual PCrashReporterChild* AllocPCrashReporterChild(const NativeThreadId& aThread) override;
virtual bool DeallocPCrashReporterChild(PCrashReporterChild*) override;

View File

@ -164,17 +164,14 @@ GMPParent::LoadProcess()
bool ok = SendSetNodeId(mNodeId);
if (!ok) {
LOGD("%s: Failed to send node id to child process", __FUNCTION__);
mProcess->Delete();
mProcess = nullptr;
return NS_ERROR_FAILURE;
}
LOGD("%s: Sent node id to child process", __FUNCTION__);
ok = SendStartPlugin();
// Intr call to block initialization on plugin load.
ok = CallStartPlugin();
if (!ok) {
LOGD("%s: Failed to send start to child process", __FUNCTION__);
mProcess->Delete();
mProcess = nullptr;
return NS_ERROR_FAILURE;
}
LOGD("%s: Sent StartPlugin to child process", __FUNCTION__);

View File

@ -34,7 +34,7 @@ parent:
child:
async BeginAsyncShutdown();
async CrashPluginNow();
async StartPlugin();
intr StartPlugin();
async SetNodeId(nsCString nodeId);
async CloseActive();
};