Bug 1346143 - Forget the widget pointer in WebRenderLayerManager::Destroy() r=nical

This commit is contained in:
sotaro 2017-04-21 18:31:52 +09:00
Родитель c235da7452
Коммит a87a0250c4
1 изменённых файлов: 6 добавлений и 1 удалений

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

@ -291,11 +291,16 @@ WebRenderLayerManager::Destroy()
RefPtr<TransactionIdAllocator> allocator = mTransactionIdAllocator;
uint64_t id = mLatestTransactionId;
RefPtr<Runnable> task = NS_NewRunnableFunction([allocator, id] () -> void {
RefPtr<Runnable> task = NS_NewRunnableFunction(
"TransactionIdAllocator::NotifyTransactionCompleted",
[allocator, id] () -> void {
allocator->NotifyTransactionCompleted(id);
});
NS_DispatchToMainThread(task.forget());
}
// Forget the widget pointer in case we outlive our owning widget.
mWidget = nullptr;
}
WebRenderLayerManager::~WebRenderLayerManager()