Chromium Code Reviews| Index: chrome/browser/media/window_icon_util_x11.cc |
| diff --git a/chrome/browser/media/window_icon_util_x11.cc b/chrome/browser/media/window_icon_util_x11.cc |
| index 36462dc229d131d6adbc58c1fadb4b26427e3624..2dea3153c645009cf188165887a71fb9afaeb3dc 100644 |
| --- a/chrome/browser/media/window_icon_util_x11.cc |
| +++ b/chrome/browser/media/window_icon_util_x11.cc |
| @@ -7,6 +7,7 @@ |
| #include <X11/Xatom.h> |
| #include <X11/Xutil.h> |
| +#include "ui/gfx/x/x11_error_tracker.h" |
| #include "ui/gfx/x/x11_types.h" |
| gfx::ImageSkia GetWindowIcon(content::DesktopMediaID id) { |
| @@ -20,10 +21,14 @@ gfx::ImageSkia GetWindowIcon(content::DesktopMediaID id) { |
| unsigned long size; |
| long* data; |
| + std::unique_ptr<gfx::X11ErrorTracker> error_tracker( |
|
sky
2016/08/26 16:40:35
Please add a comment here, something similar to Da
qiangchen
2016/08/26 17:30:01
Done.
|
| + new gfx::X11ErrorTracker()); |
| int status = XGetWindowProperty(display, id.id, property, 0L, ~0L, False, |
| AnyPropertyType, &actual_type, &actual_format, |
| &size, &bytes_after, |
| reinterpret_cast<unsigned char**>(&data)); |
| + error_tracker.reset(); |
| + |
| if (status != Success) { |
| return gfx::ImageSkia(); |
| } |