Commit f1d69928 authored by Zhenyao Mo's avatar Zhenyao Mo Committed by Commit Bot

Add last error to crash reports when CreateWindowEx() failed.

BUG=974713
TEST=compile
R=sunnyps@chromium.org

Change-Id: Icb9bbb7896fbd2994c0e1936b798e48eb7ab4f13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1666612
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Auto-Submit: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: default avatarSunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670338}
parent 85114e77
......@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/debug/alias.h"
#include "base/memory/weak_ptr.h"
#include "base/win/wrapped_window_proc.h"
#include "ui/gfx/win/hwnd_util.h"
......@@ -96,7 +97,11 @@ void CreateWindowsOnThread(const gfx::Size& size,
reinterpret_cast<wchar_t*>(g_window_class), L"",
WS_CHILDWINDOW | WS_DISABLED | WS_VISIBLE, 0, 0, size.width(),
size.height(), *parent_window, nullptr, nullptr, nullptr);
CHECK(window);
if (!window) {
logging::SystemErrorCode error = logging::GetLastSystemErrorCode();
base::debug::Alias(&error);
CHECK(false);
}
*child_window = window;
event->Signal();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment