Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: ui/base/win/hwnd_util.cc

Issue 6995157: Disables tooltips if we can't create the tooltip window. I still don't (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to trunk and update comments Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | views/view.cc » ('j') | views/view.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/win/hwnd_util.cc
diff --git a/ui/base/win/hwnd_util.cc b/ui/base/win/hwnd_util.cc
index e71dac856c0ae20ade974cb09deda21f41ca7797..923c85cbf4de24f3a41d693cce7267a59da9ecfe 100644
--- a/ui/base/win/hwnd_util.cc
+++ b/ui/base/win/hwnd_util.cc
@@ -170,22 +170,8 @@ void CenterAndSizeWindow(HWND parent,
}
void CheckWindowCreated(HWND hwnd) {
- if (hwnd)
- return;
-
- LPWSTR error_string = NULL;
- DWORD last_error = GetLastError();
- FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM,
- 0, // Use the internal message table.
- last_error,
- 0, // Use default language.
- 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;
+ if (!hwnd)
+ LOG_GETLASTERROR(FATAL);
}
} // namespace ui
« no previous file with comments | « no previous file | views/view.cc » ('j') | views/view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698