summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-13 04:06:24 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-13 04:06:24 +0000
commit831de724f3aed4700bb20750e2434b4159f485da (patch)
tree0486914d3c088ad770927700fd606a93176c562a /views
parent340eab6c6cf8009fdad6275d44ca06eeedea7565 (diff)
downloadchromium_src-831de724f3aed4700bb20750e2434b4159f485da.zip
chromium_src-831de724f3aed4700bb20750e2434b4159f485da.tar.gz
chromium_src-831de724f3aed4700bb20750e2434b4159f485da.tar.bz2
Adds yet more debugging code.
BUG=77651 TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/6834006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81363 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/widget/widget_win.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
index 8596ef2..05ba37d 100644
--- a/views/widget/widget_win.cc
+++ b/views/widget/widget_win.cc
@@ -6,7 +6,9 @@
#include <dwmapi.h>
+#include "base/string_number_conversions.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "base/win/windows_version.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/base/dragdrop/drag_source.h"
@@ -607,8 +609,21 @@ void WidgetWin::OnCommand(UINT notification_code, int command_id, HWND window) {
}
LRESULT WidgetWin::OnCreate(CREATESTRUCT* create_struct) {
+ // Debugging code to help track 77651.
CHECK(hwnd());
- CHECK(ui::WindowImpl::IsWindowImpl(hwnd()));
+ if (!ui::WindowImpl::IsWindowImpl(hwnd())) {
+ std::wstring class_name;
+ wchar_t tmp[128];
+ if (!::GetClassName(hwnd(), tmp, 128)) {
+ class_name = L"unable to get class name error=" +
+ UTF8ToWide(base::IntToString(GetLastError()));
+ } else {
+ class_name = std::wstring(tmp);
+ }
+
+ CHECK(false) << " Not a window impl, hwnd=" << hwnd() <<
+ " class_name=" << class_name << " is_window=" << ::IsWindow(hwnd());
+ }
SetNativeWindowProperty(kNativeWidgetKey, this);
CHECK_EQ(this, GetNativeWidgetForNativeView(hwnd()));