Bug 1261070 - Move Send__delete__ to FailedAsyncOpen. r=jduell

This commit is contained in:
Dragana Damjanovic 2016-04-07 10:33:44 +02:00
Родитель 7a0fa292e7
Коммит 3ad4a4c69c
1 изменённых файлов: 8 добавлений и 4 удалений

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

@ -1092,6 +1092,14 @@ HttpChannelChild::FailedAsyncOpen(const nsresult& status)
// We're already being called from IPDL, therefore already "async"
HandleAsyncAbort();
if (mIPCOpen) {
PHttpChannelChild::Send__delete__(this);
}
// WARNING: DO NOT RELY ON |THIS| EXISTING ANY MORE!
//
// NeckoChild::DeallocPHttpChannelChild() may have been called, which deletes
// |this| if IPDL holds the last reference.
}
void
@ -1103,10 +1111,6 @@ HttpChannelChild::DoNotifyListenerCleanup()
mInterceptListener->Cleanup();
mInterceptListener = nullptr;
}
if (mIPCOpen) {
PHttpChannelChild::Send__delete__(this);
}
}
class DeleteSelfEvent : public ChannelEvent