mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1411977 - Part 4: Only try to dispatch the release of TransportLayers when there is a target thread. r=drno
MozReview-Commit-ID: 8fOkZwcxKHy --HG-- extra : rebase_source : 29eafb58f0207e2d0b973ce8e846ce437a23317e
This commit is contained in:
parent
2dc55eb3d7
commit
83c9be0a4e
@ -35,10 +35,12 @@ TransportFlow::~TransportFlow() {
|
||||
// destroy it simultaneously. The conversion to an nsAutoPtr
|
||||
// ensures automatic destruction of the queue at exit of
|
||||
// DestroyFinal.
|
||||
nsAutoPtr<std::deque<TransportLayer*>> layers_tmp(layers_.release());
|
||||
RUN_ON_THREAD(target_,
|
||||
WrapRunnableNM(&TransportFlow::DestroyFinal, layers_tmp),
|
||||
NS_DISPATCH_NORMAL);
|
||||
if (target_) {
|
||||
nsAutoPtr<std::deque<TransportLayer*>> layers_tmp(layers_.release());
|
||||
RUN_ON_THREAD(target_,
|
||||
WrapRunnableNM(&TransportFlow::DestroyFinal, layers_tmp),
|
||||
NS_DISPATCH_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
void TransportFlow::DestroyFinal(nsAutoPtr<std::deque<TransportLayer *> > layers) {
|
||||
|
Loading…
Reference in New Issue
Block a user