Bug 1124452 - Ensure the widget continues to be destroyed on the main thread. r=BenWa
This commit is contained in:
@@ -83,3 +83,17 @@ ChromeProcessController::AcknowledgeScrollUpdate(const FrameMetrics::ViewID& aSc
|
||||
{
|
||||
APZCCallbackHelper::AcknowledgeScrollUpdate(aScrollId, aScrollGeneration);
|
||||
}
|
||||
|
||||
void
|
||||
ChromeProcessController::Destroy()
|
||||
{
|
||||
if (MessageLoop::current() != mUILoop) {
|
||||
mUILoop->PostTask(
|
||||
FROM_HERE,
|
||||
NewRunnableMethod(this, &ChromeProcessController::Destroy));
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(MessageLoop::current() == mUILoop);
|
||||
mWidget = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user