Commit 1d9f316a authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

chromeos: fix infinite loop in cursor lookup

And remove a NOTREACHED that we're hitting. I will supply a test for this
separate, as well as investgating removal of NOREACHED.

BUG=855767
TEST=none

Change-Id: Idf59b80388fefa06317a70055d18db995187c9a0
Reviewed-on: https://chromium-review.googlesource.com/1134352Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574371}
parent c671bf91
...@@ -35,6 +35,8 @@ gfx::NativeCursor WindowDelegateImpl::GetCursor(const gfx::Point& point) { ...@@ -35,6 +35,8 @@ gfx::NativeCursor WindowDelegateImpl::GetCursor(const gfx::Point& point) {
server_window; server_window = ServerWindow::GetMayBeNull( server_window; server_window = ServerWindow::GetMayBeNull(
server_window->window()->parent())) { server_window->window()->parent())) {
if (server_window->IsTopLevel()) { if (server_window->IsTopLevel()) {
if (server_window->window() == window_)
return server_window->cursor();
gfx::Point toplevel_point = point; gfx::Point toplevel_point = point;
aura::Window::ConvertPointToTarget(window_, server_window->window(), aura::Window::ConvertPointToTarget(window_, server_window->window(),
&toplevel_point); &toplevel_point);
...@@ -45,7 +47,8 @@ gfx::NativeCursor WindowDelegateImpl::GetCursor(const gfx::Point& point) { ...@@ -45,7 +47,8 @@ gfx::NativeCursor WindowDelegateImpl::GetCursor(const gfx::Point& point) {
return server_window->cursor(); return server_window->cursor();
} }
NOTREACHED(); // TODO(sky): there should be a NOTREACHED() here, but we're hitting this on
// asan builder. Figure out. https://crbug.com/855767.
return gfx::kNullCursor; return gfx::kNullCursor;
} }
......
...@@ -11,8 +11,10 @@ ...@@ -11,8 +11,10 @@
namespace ui { namespace ui {
namespace ws2 { namespace ws2 {
// The aura::WindowDelegate implementation used for non-top-level windows // The aura::WindowDelegate implementation used by Windows created by the
// created by the WindowService. // WindowService. The local environment may create its own WindowDelegate for
// top-level windows (by way of WindowServiceDelegate::NewTopLevel()).
//
// WindowDelegateImpl deletes itself when the associated window is deleted. // WindowDelegateImpl deletes itself when the associated window is deleted.
class COMPONENT_EXPORT(WINDOW_SERVICE) WindowDelegateImpl class COMPONENT_EXPORT(WINDOW_SERVICE) WindowDelegateImpl
: public aura::WindowDelegate { : public aura::WindowDelegate {
......
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