mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
Bug 1183651 - Avoid operating refcount of fullscreen task runnable inside the transition thread. r=jimm
--HG-- extra : source : df714d699348ea188ec6e2456560c60ce600408a
This commit is contained in:
parent
3b99269432
commit
5963d09c4e
@ -2866,16 +2866,15 @@ FullscreenTransitionWindowProc(HWND hWnd, UINT uMsg,
|
||||
switch (uMsg) {
|
||||
case WM_FULLSCREEN_TRANSITION_BEFORE:
|
||||
case WM_FULLSCREEN_TRANSITION_AFTER: {
|
||||
// The message sender should have added ref for us.
|
||||
nsCOMPtr<nsIRunnable> callback =
|
||||
already_AddRefed<nsIRunnable>((nsIRunnable*)wParam);
|
||||
DWORD duration = (DWORD)lParam;
|
||||
DWORD flags = AW_BLEND;
|
||||
if (uMsg == WM_FULLSCREEN_TRANSITION_AFTER) {
|
||||
flags |= AW_HIDE;
|
||||
}
|
||||
::AnimateWindow(hWnd, duration, flags);
|
||||
NS_DispatchToMainThread(callback);
|
||||
// The message sender should have added ref for us.
|
||||
NS_DispatchToMainThread(
|
||||
already_AddRefed<nsIRunnable>((nsIRunnable*)wParam));
|
||||
break;
|
||||
}
|
||||
case WM_DESTROY:
|
||||
|
Loading…
Reference in New Issue
Block a user