зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1559859 - Always release mWidget in UiCompositorControllerChild::Destroy() r=kats
Differential Revision: https://phabricator.services.mozilla.com/D35210 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
45555d1065
Коммит
62e9533629
|
@ -183,14 +183,16 @@ void UiCompositorControllerChild::Destroy() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (mIsOpen) {
|
||||
// Close the underlying IPC channel.
|
||||
|
||||
if (mWidget) {
|
||||
// Dispatch mWidget to main thread to prevent it from being destructed by
|
||||
// the ui thread.
|
||||
RefPtr<nsIWidget> widget = mWidget.forget();
|
||||
NS_ReleaseOnMainThreadSystemGroup("UiCompositorControllerChild::mWidget",
|
||||
widget.forget());
|
||||
}
|
||||
|
||||
if (mIsOpen) {
|
||||
// Close the underlying IPC channel.
|
||||
PUiCompositorControllerChild::Close();
|
||||
mIsOpen = false;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче