зеркало из https://github.com/mozilla/gecko-dev.git
Delay the DidComposite call in ClientLayerManager's destructor. (bug 1305829, r=mattwoodrow)
This commit is contained in:
Родитель
053ecfd3c3
Коммит
67e19d1d22
|
@ -112,8 +112,15 @@ ClientLayerManager::ClientLayerManager(nsIWidget* aWidget)
|
|||
ClientLayerManager::~ClientLayerManager()
|
||||
{
|
||||
if (mTransactionIdAllocator) {
|
||||
TimeStamp now = TimeStamp::Now();
|
||||
DidComposite(mLatestTransactionId, now, now);
|
||||
// Make sure to notify the refresh driver just in case it's waiting on a
|
||||
// pending transaction.
|
||||
RefPtr<TransactionIdAllocator> allocator = mTransactionIdAllocator;
|
||||
uint64_t id = mLatestTransactionId;
|
||||
|
||||
RefPtr<Runnable> task = NS_NewRunnableFunction([allocator, id] () -> void {
|
||||
allocator->NotifyTransactionCompleted(id);
|
||||
});
|
||||
NS_DispatchToMainThread(task.forget());
|
||||
}
|
||||
mMemoryPressureObserver->Destroy();
|
||||
ClearCachedResources();
|
||||
|
|
Загрузка…
Ссылка в новой задаче