Bug 1367806 - Fix ref counting of tasks for remoted Win32 methods in plugin processes. r=jimm

We were using the task after we .forget() it.
This commit is contained in:
David Parks 2017-05-26 13:19:54 -07:00
parent 6d2ca8d657
commit 3b7d1c27e9

View File

@ -2153,7 +2153,7 @@ PostToPluginThread(PluginThreadTaskData* aTaskData)
}
RefPtr<PluginThreadTask> task = new PluginThreadTask(aTaskData, semaphore);
ProcessChild::message_loop()->PostTask(task.forget());
ProcessChild::message_loop()->PostTask(do_AddRef(task));
DWORD err = WaitForSingleObject(semaphore, INFINITE);
if (err != WAIT_FAILED) {
return task->Success();