зеркало из https://github.com/mozilla/gecko-dev.git
Test for bug 539343.
--HG-- extra : transplant_source : J0p%C1%D3%7F%A5%D5%7Ds%F3%3F%8EG%B4%DD%D5%2A_%B2
This commit is contained in:
Родитель
53e84d481c
Коммит
9465670838
|
@ -15,7 +15,7 @@ parent:
|
|||
// tests check shutdown semantics
|
||||
PTestShutdownSub(bool expectCrash);
|
||||
|
||||
// Used to synchronize between parent and child, to avoid racies
|
||||
// Used to synchronize between parent and child, to avoid races
|
||||
// around flushing socket write queues
|
||||
sync Sync();
|
||||
|
||||
|
|
|
@ -45,12 +45,16 @@ class TestShutdownSubParent :
|
|||
public PTestShutdownSubParent
|
||||
{
|
||||
public:
|
||||
TestShutdownSubParent(bool expectCrash) : mExpectCrash(expectCrash)
|
||||
TestShutdownSubParent(bool expectCrash) :
|
||||
mExpectCrash(expectCrash),
|
||||
mDeletedCount(0)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~TestShutdownSubParent()
|
||||
{
|
||||
if (2 != mDeletedCount)
|
||||
fail("managees outliving manager!");
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -66,6 +70,7 @@ protected:
|
|||
DeallocPTestShutdownSubsub(PTestShutdownSubsubParent* actor)
|
||||
{
|
||||
delete actor;
|
||||
++mDeletedCount;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -75,6 +80,7 @@ protected:
|
|||
|
||||
private:
|
||||
bool mExpectCrash;
|
||||
int mDeletedCount;
|
||||
};
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче