Bug 562253 - Taskbar tab preview code crashes in mozilla::widget::TaskbarTabPreview::GlobalWndProc(HWND__*, unsigned int, unsigned int, long) r=jimm
authorRob Arnold <robarnold@cmu.edu>
Sun, 02 May 2010 23:20:00 -0400
changeset 41744 3a7920df7580eea2ce90fc07d075cf0d593b2583
parent 41743 02ca6f9215bcc6fe495c666af9c251968e6e2049
child 41745 b69260e4687ebdb9faa2d6326e1ab50cb6921d27
push id13112
push userrobarnold@cmu.edu
push dateMon, 03 May 2010 16:42:38 +0000
treeherdermozilla-central@3a7920df7580 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs562253
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 562253 - Taskbar tab preview code crashes in mozilla::widget::TaskbarTabPreview::GlobalWndProc(HWND__*, unsigned int, unsigned int, long) r=jimm
widget/src/windows/TaskbarTabPreview.cpp
--- a/widget/src/windows/TaskbarTabPreview.cpp
+++ b/widget/src/windows/TaskbarTabPreview.cpp
@@ -216,16 +216,18 @@ TaskbarTabPreview::GlobalWndProc(HWND hW
   if (nMsg == WM_CREATE) {
     CREATESTRUCT *cs = reinterpret_cast<CREATESTRUCT*>(lParam);
     preview = reinterpret_cast<TaskbarTabPreview*>(cs->lpCreateParams);
     if (!::SetPropW(hWnd, TASKBARPREVIEW_HWNDID, preview))
       NS_ERROR("Could not associate native window with tab preview");
     preview->mProxyWindow = hWnd;
   } else {
     preview = reinterpret_cast<TaskbarTabPreview*>(::GetPropW(hWnd, TASKBARPREVIEW_HWNDID));
+    if (nMsg == WM_DESTROY)
+      ::RemovePropW(hWnd, TASKBARPREVIEW_HWNDID);
   }
 
   if (preview)
     return preview->WndProc(nMsg, wParam, lParam);
   return ::DefWindowProcW(hWnd, nMsg, wParam, lParam);
 }
 
 nsresult