mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1207161 - fix run-by-dir leak in test_bug846906.xul; r=mccr8
This commit is contained in:
parent
04f5074ec1
commit
4e7e5703c8
@ -80,7 +80,6 @@ skip-if = os == 'linux' || os == 'mac' # Bug 1026815
|
||||
[test_bug690056.xul]
|
||||
[test_bug789773.xul]
|
||||
[test_bug846906.xul]
|
||||
skip-if = (os == 'linux' && asan) || debug # Bug 1207161
|
||||
[test_bug89419.xul]
|
||||
[test_bug909218.html]
|
||||
[test_bug92598.xul]
|
||||
|
@ -136,7 +136,12 @@ void nsView::DestroyWidget()
|
||||
nsCOMPtr<nsIRunnable> widgetDestroyer =
|
||||
new DestroyWidgetRunnable(mWindow);
|
||||
|
||||
NS_DispatchToMainThread(widgetDestroyer);
|
||||
// Don't leak if we happen to arrive here after the main thread
|
||||
// has disappeared.
|
||||
nsCOMPtr<nsIThread> mainThread = do_GetMainThread();
|
||||
if (mainThread) {
|
||||
mainThread->Dispatch(widgetDestroyer.forget(), NS_DISPATCH_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
mWindow = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user