summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/webwidget_host_win.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 23:20:59 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 23:20:59 +0000
commit0dea0a65b4cabd5910fb8747a0cb3935a27e6ec5 (patch)
treeeaf31b951ecea22f0278d02b1f73edc7c99fc967 /webkit/tools/test_shell/webwidget_host_win.cc
parentfb0a00f524b27ffe28a830cc44ce8135a41cdaad (diff)
downloadchromium_src-0dea0a65b4cabd5910fb8747a0cb3935a27e6ec5.zip
chromium_src-0dea0a65b4cabd5910fb8747a0cb3935a27e6ec5.tar.gz
chromium_src-0dea0a65b4cabd5910fb8747a0cb3935a27e6ec5.tar.bz2
This CL adds macro used to track the creation and destruction
of HWNDs, in an attempt to detect potential double-delete. A double-delete of a HWND might be responsible for the crasher http://crbug.com/4714 Review URL: http://codereview.chromium.org/21018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/webwidget_host_win.cc')
-rw-r--r--webkit/tools/test_shell/webwidget_host_win.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/webkit/tools/test_shell/webwidget_host_win.cc b/webkit/tools/test_shell/webwidget_host_win.cc
index c282699..845abf3 100644
--- a/webkit/tools/test_shell/webwidget_host_win.cc
+++ b/webkit/tools/test_shell/webwidget_host_win.cc
@@ -36,7 +36,7 @@ WebWidgetHost* WebWidgetHost::Create(gfx::NativeWindow parent_window,
kWindowClassName, kWindowClassName, WS_POPUP,
0, 0, 0, 0,
parent_window, NULL, GetModuleHandle(NULL), NULL);
-
+ TRACK_HWND_CREATION(host->view_);
win_util::SetWindowUserData(host->view_, host);
host->webwidget_ = WebWidget::Create(delegate);
@@ -58,6 +58,9 @@ LRESULT CALLBACK WebWidgetHost::WndProc(HWND hwnd, UINT message, WPARAM wparam,
case WM_DESTROY:
delete host;
break;
+ case WM_NCDESTROY:
+ TRACK_HWND_DESTRUCTION(hwnd);
+ break;
case WM_PAINT: {
RECT rect;