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

Issue 3175038: Allow overriding of X error functions (Closed)

Created:
10 years, 4 months ago by DaveMoore
Modified:
9 years, 7 months ago
CC:
chromium-reviews, nkostylev+cc_chromium.org, ben+cc_chromium.org, jam, apatrick_chromium, darin-cc_chromium.org, brettw-cc_chromium.org, stuartmorgan+watch_chromium.org, davemoore+watch_chromium.org, willchan no longer on Chromium, pam+watch_chromium.org
Visibility:
Public.

Description

Allow overriding of X error functions BUG=50006 (and various other reports) TEST=Run chrome under nested window manager using Xephyr (see http://code.google.com/p/chromium/wiki/LayoutTestsLinux) use --enable-logging=stderr --log-level=0 kill xephyr examine log. You should see X IO Error detected followed (not necessarily immediately) by successfully saved /tmp/tx/Default/Preferences successfully saved /tmp/tx/Local State successfully saved /tmp/tx/Local State successfully saved /tmp/tx/Default/Preferences along with no crash. There is a high ranking crash report on both linux and chromeos that happens whenever X sends an error to chrome. This change causes us to log and continue when we get a regular error from X. When we get an IO error, indicating X is gone, we attempt to shut down gracefully. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=59147

Patch Set 1 #

Patch Set 2 : Remove unnecessary function #

Patch Set 3 : Stray changes #

Total comments: 15

Patch Set 4 : Fix some review questions #

Patch Set 5 : Fix some review questions #

Patch Set 6 : Fix some review questions #

Total comments: 4

Patch Set 7 : Made chrome not exit until quit message when handling IO error #

Total comments: 4

Patch Set 8 : Don't close the browsers...there are too many issues with doing it while X isn't running #

Patch Set 9 : Some cleanup, and add browser_main_gtk.h #

Patch Set 10 : Do as much of CloseAllBrowsers() as we can #

Patch Set 11 : Wait with timeout for files to be written #

Total comments: 32

Patch Set 12 : Made modifications for review #

Patch Set 13 : Made modifications for review #

Patch Set 14 : Publish CloseAllBrowsers() #

Total comments: 24

Patch Set 15 : Fixed some review comments #

Patch Set 16 : Messed up #ifdef #

Unified diffs Side-by-side diffs Delta from patch set Stats (+255 lines, -112 lines) Patch
M app/x11_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -2 lines 0 comments Download
M app/x11_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +104 lines, -84 lines 0 comments Download
M app/x11_util_internal.h View 12 13 14 15 2 chunks +12 lines, -2 lines 0 comments Download
M chrome/app/chrome_dll_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/app_controller_mac.mm View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browser_list.h View 12 13 14 1 chunk +5 lines, -6 lines 0 comments Download
M chrome/browser/browser_list.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +16 lines, -7 lines 0 comments Download
M chrome/browser/browser_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +5 lines, -0 lines 0 comments Download
A chrome/browser/browser_main_gtk.h View 9 10 11 12 13 14 1 chunk +15 lines, -0 lines 0 comments Download
M chrome/browser/browser_main_gtk.cc View 8 9 10 11 12 13 14 3 chunks +36 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +28 lines, -3 lines 0 comments Download
M chrome/browser/browser_shutdown.h View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/browser_shutdown.cc View 12 13 14 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/tab_closeable_state_watcher.cc View 8 9 10 11 12 13 14 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/gtk/bookmark_bar_gtk.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/views/bookmark_bar_view.cc View 8 9 10 11 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M chrome/gpu/gpu_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -1 line 0 comments Download
M chrome/plugin/plugin_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 17 (0 generated)
DaveMoore
10 years, 4 months ago (2010-08-24 21:13:07 UTC) #1
Evan Martin
For TEST=, can you verify that shutting down X causes us to shut down cleanly? ...
10 years, 4 months ago (2010-08-24 21:26:56 UTC) #2
Lei Zhang
http://codereview.chromium.org/3175038/diff/4001/5006 File chrome/browser/browser_process_impl.cc (right): http://codereview.chromium.org/3175038/diff/4001/5006#newcode269 chrome/browser/browser_process_impl.cc:269: // Can't run a local loop on linux. On ...
10 years, 4 months ago (2010-08-24 21:55:38 UTC) #3
willchan no longer on Chromium
Yes, as Lei pointed out, I said that, and I still think it's right. That ...
10 years, 4 months ago (2010-08-25 17:36:09 UTC) #4
DaveMoore
http://codereview.chromium.org/3175038/diff/4001/5001 File app/x11_util.cc (right): http://codereview.chromium.org/3175038/diff/4001/5001#newcode56 app/x11_util.cc:56: int X11ErrorHandler(Display* d, _XErrorEvent* e) { Rename done. They're ...
10 years, 4 months ago (2010-08-25 18:02:46 UTC) #5
Evan Martin
http://codereview.chromium.org/3175038/diff/17001/18004 File chrome/browser/browser_list.cc (right): http://codereview.chromium.org/3175038/diff/17001/18004#newcode323 chrome/browser/browser_list.cc:323: exit(ResultCodes::NORMAL_EXIT); exit() runs the atexit handlers. I think we ...
10 years, 4 months ago (2010-08-25 18:15:53 UTC) #6
DaveMoore
http://codereview.chromium.org/3175038/diff/17001/18004 File chrome/browser/browser_list.cc (right): http://codereview.chromium.org/3175038/diff/17001/18004#newcode323 chrome/browser/browser_list.cc:323: exit(ResultCodes::NORMAL_EXIT); On 2010/08/25 18:15:54, Evan Martin wrote: > exit() ...
10 years, 4 months ago (2010-08-25 18:55:15 UTC) #7
Evan Martin
LGTM, one last nit http://codereview.chromium.org/3175038/diff/22001/23004 File chrome/browser/browser_list.cc (right): http://codereview.chromium.org/3175038/diff/22001/23004#newcode326 chrome/browser/browser_list.cc:326: // BrowserProcessImpl::EndSession(). Can you leave ...
10 years, 4 months ago (2010-08-25 18:56:53 UTC) #8
Andrew T Wilson (Slow)
http://codereview.chromium.org/3175038/diff/22001/23004 File chrome/browser/browser_list.cc (right): http://codereview.chromium.org/3175038/diff/22001/23004#newcode305 chrome/browser/browser_list.cc:305: BrowserList::CloseAllBrowsers(false); I don't think it's cool to shutdown without ...
10 years, 4 months ago (2010-08-25 19:09:12 UTC) #9
brettw
Does this mean if X crashes/exits (control-alt-backspace?) then Chrome will shut down "cleanly" and I ...
10 years, 4 months ago (2010-08-26 00:08:02 UTC) #10
DaveMoore
That is the goal. On 2010/08/26 00:08:02, brettw wrote: > Does this mean if X ...
10 years, 4 months ago (2010-08-26 05:15:30 UTC) #11
DaveMoore
There were a few debug checks I needed to make more specific, and I made ...
10 years, 3 months ago (2010-09-02 19:48:19 UTC) #12
darin (slow to review)
http://codereview.chromium.org/3175038/diff/35001/36001 File app/x11_util.cc (right): http://codereview.chromium.org/3175038/diff/35001/36001#newcode77 app/x11_util.cc:77: // consumers of x11_util.h to have to include XLib.h ...
10 years, 3 months ago (2010-09-08 18:16:14 UTC) #13
DaveMoore
http://codereview.chromium.org/3175038/diff/35001/36001 File app/x11_util.cc (right): http://codereview.chromium.org/3175038/diff/35001/36001#newcode77 app/x11_util.cc:77: // consumers of x11_util.h to have to include XLib.h ...
10 years, 3 months ago (2010-09-08 23:25:29 UTC) #14
darin (slow to review)
http://codereview.chromium.org/3175038/diff/53001/28012 File app/x11_util.cc (right): http://codereview.chromium.org/3175038/diff/53001/28012#newcode70 app/x11_util.cc:70: std::string GetErrorEventDescription(XErrorEvent* e) { nit: it seems like it ...
10 years, 3 months ago (2010-09-10 16:39:01 UTC) #15
DaveMoore
http://codereview.chromium.org/3175038/diff/53001/28012 File app/x11_util.cc (right): http://codereview.chromium.org/3175038/diff/53001/28012#newcode70 app/x11_util.cc:70: std::string GetErrorEventDescription(XErrorEvent* e) { On 2010/09/10 16:39:02, darin wrote: ...
10 years, 3 months ago (2010-09-10 19:05:41 UTC) #16
darin (slow to review)
10 years, 3 months ago (2010-09-10 20:25:04 UTC) #17
LGTM

Powered by Google App Engine
This is Rietveld 408576698