Bug 1182017. Call Send__delete__ immediately rather than through an event. r=nical

Kyle assures me it's safe to call Send__delete__ with references to 'this' on
the stack.

--HG--
extra : commitid : I7Wj1a8Hmb9
extra : rebase_source : 8cf8851a7f4400fb1120179423ec4cf710d75765
This commit is contained in:
Robert O'Callahan 2015-08-27 15:40:35 +12:00
Родитель df0adb1534
Коммит 3f68002324
1 изменённых файлов: 1 добавлений и 8 удалений

Просмотреть файл

@ -20,16 +20,9 @@ ImageContainerParent::~ImageContainerParent()
} }
} }
static void SendDeleteAndIgnoreResult(ImageContainerParent* self)
{
unused << PImageContainerParent::Send__delete__(self);
}
bool ImageContainerParent::RecvAsyncDelete() bool ImageContainerParent::RecvAsyncDelete()
{ {
MessageLoop::current()->PostTask( unused << PImageContainerParent::Send__delete__(this);
FROM_HERE, NewRunnableFunction(&SendDeleteAndIgnoreResult, this));
return true; return true;
} }