summaryrefslogtreecommitdiffstats
path: root/ui/base
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 21:58:24 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 21:58:24 +0000
commita1a9e7c87641ad88d189c154293bf602859249f3 (patch)
treeb04b48cd64234951f45bd6ff16752b1be3c6ff61 /ui/base
parentce0cb2221ce904f7e18db8e6fcbbba689e0d44d0 (diff)
downloadchromium_src-a1a9e7c87641ad88d189c154293bf602859249f3.zip
chromium_src-a1a9e7c87641ad88d189c154293bf602859249f3.tar.gz
chromium_src-a1a9e7c87641ad88d189c154293bf602859249f3.tar.bz2
Removes code added to track down crash. The crash seems to have
occurred for two reasons: . window class name changing out from under us. . CreateWindow returning NULL because we're out of memory. I've changed the following: . Left in CHECK on return from CreateWindow. . Removed dependency on class name. We don't really need it anyway. I've also changed View::PaintFocusableBorder to check focusable last, as that requires looking up the FocusManager BUG=77651 TEST=none Review URL: http://codereview.chromium.org/6865023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81812 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-rw-r--r--ui/base/win/window_impl.cc15
-rw-r--r--ui/base/win/window_impl.h3
2 files changed, 1 insertions, 17 deletions
diff --git a/ui/base/win/window_impl.cc b/ui/base/win/window_impl.cc
index 1d2c55b..d07c8c3 100644
--- a/ui/base/win/window_impl.cc
+++ b/ui/base/win/window_impl.cc
@@ -159,33 +159,20 @@ void WindowImpl::Init(HWND parent, const gfx::Rect& bounds) {
reinterpret_cast<LPWSTR>(&error_string),
0, // Buffer size.
0); // Arguments (unused).
+ // Typical reason for failure is ERROR_NOT_ENOUGH_MEMORY (8).
CHECK(false) << "Create failed error=" << last_error <<
" message=" << error_string << " name=" << name << " style=" <<
window_style_ << " ex_style=" << window_ex_style_;
- if (error_string)
- LocalFree(error_string);
}
// The window procedure should have set the data for us.
CHECK_EQ(this, ui::GetWindowUserData(hwnd_));
-
- CHECK(IsWindowImpl(hwnd_));
}
HICON WindowImpl::GetDefaultWindowIcon() const {
return NULL;
}
-// static
-bool WindowImpl::IsWindowImpl(HWND hwnd) {
- wchar_t tmp[128];
- if (!::GetClassName(hwnd, tmp, 128))
- return false;
-
- std::wstring class_name(tmp);
- return class_name.find(kBaseClassName) == 0;
-}
-
LRESULT WindowImpl::OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) {
LRESULT result = 0;
diff --git a/ui/base/win/window_impl.h b/ui/base/win/window_impl.h
index 59b7562..5a59819 100644
--- a/ui/base/win/window_impl.h
+++ b/ui/base/win/window_impl.h
@@ -71,9 +71,6 @@ class WindowImpl : public MessageMapInterface {
}
UINT initial_class_style() const { return class_style_; }
- // Returns true if the specified |hwnd| is a WindowImpl.
- static bool IsWindowImpl(HWND hwnd);
-
protected:
// Handles the WndProc callback for this object.
virtual LRESULT OnWndProc(UINT message, WPARAM w_param, LPARAM l_param);