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

Side by Side Diff: app/x11_util.cc

Issue 5066002: X11: Make the default X11 error handler non-fatal. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/gpu/gpu_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file defines utility functions for X11 (Linux only). This code has been 5 // This file defines utility functions for X11 (Linux only). This code has been
6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support 6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support
7 // remains woefully incomplete. 7 // remains woefully incomplete.
8 8
9 #include "app/x11_util.h" 9 #include "app/x11_util.h"
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 static CachedPictFormats* formats = NULL; 49 static CachedPictFormats* formats = NULL;
50 if (!formats) 50 if (!formats)
51 formats = new CachedPictFormats(); 51 formats = new CachedPictFormats();
52 return formats; 52 return formats;
53 } 53 }
54 54
55 // Maximum number of CachedPictFormats we keep around. 55 // Maximum number of CachedPictFormats we keep around.
56 const size_t kMaxCacheSize = 5; 56 const size_t kMaxCacheSize = 5;
57 57
58 int DefaultX11ErrorHandler(Display* d, XErrorEvent* e) { 58 int DefaultX11ErrorHandler(Display* d, XErrorEvent* e) {
59 LOG(FATAL) << GetErrorEventDescription(d, e); 59 LOG(ERROR) << GetErrorEventDescription(d, e);
60 return 0; 60 return 0;
61 } 61 }
62 62
63 int DefaultX11IOErrorHandler(Display* d) { 63 int DefaultX11IOErrorHandler(Display* d) {
64 // If there's an IO error it likely means the X server has gone away 64 // If there's an IO error it likely means the X server has gone away
65 LOG(ERROR) << "X IO Error detected"; 65 LOG(ERROR) << "X IO Error detected";
66 _exit(1); 66 _exit(1);
67 } 67 }
68 68
69 } // namespace 69 } // namespace
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 "X Error detected: serial %lu, error_code %u (%s), " 871 "X Error detected: serial %lu, error_code %u (%s), "
872 "request_code %u minor_code %u (%s)", 872 "request_code %u minor_code %u (%s)",
873 error_event->serial, error_event->error_code, error_str, 873 error_event->serial, error_event->error_code, error_str,
874 error_event->request_code, error_event->minor_code, request_str); 874 error_event->request_code, error_event->minor_code, request_str);
875 } 875 }
876 // ---------------------------------------------------------------------------- 876 // ----------------------------------------------------------------------------
877 // End of x11_util_internal.h 877 // End of x11_util_internal.h
878 878
879 879
880 } // namespace x11_util 880 } // namespace x11_util
OLDNEW
« no previous file with comments | « no previous file | chrome/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698