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

Side by Side Diff: components/crash/browser/crash_handler_host_linux.cc

Issue 1004933003: favor DCHECK_CURRENTLY_ON for better logs in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "components/crash/browser/crash_handler_host_linux.h" 5 #include "components/crash/browser/crash_handler_host_linux.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 #include <sys/syscall.h> 10 #include <sys/syscall.h>
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 BrowserThread::PostTask( 395 BrowserThread::PostTask(
396 BrowserThread::IO, FROM_HERE, 396 BrowserThread::IO, FROM_HERE,
397 base::Bind(&CrashHandlerHostLinux::QueueCrashDumpTask, 397 base::Bind(&CrashHandlerHostLinux::QueueCrashDumpTask,
398 base::Unretained(this), 398 base::Unretained(this),
399 base::Passed(&info), 399 base::Passed(&info),
400 signal_fd)); 400 signal_fd));
401 } 401 }
402 402
403 void CrashHandlerHostLinux::QueueCrashDumpTask(scoped_ptr<BreakpadInfo> info, 403 void CrashHandlerHostLinux::QueueCrashDumpTask(scoped_ptr<BreakpadInfo> info,
404 int signal_fd) { 404 int signal_fd) {
405 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 405 DCHECK_CURRENTLY_ON(BrowserThread::IO);
406 406
407 // Send the done signal to the process: it can exit now. 407 // Send the done signal to the process: it can exit now.
408 struct msghdr msg = {0}; 408 struct msghdr msg = {0};
409 struct iovec done_iov; 409 struct iovec done_iov;
410 done_iov.iov_base = const_cast<char*>("\x42"); 410 done_iov.iov_base = const_cast<char*>("\x42");
411 done_iov.iov_len = 1; 411 done_iov.iov_len = 1;
412 msg.msg_iov = &done_iov; 412 msg.msg_iov = &done_iov;
413 msg.msg_iovlen = 1; 413 msg.msg_iovlen = 1;
414 414
415 HANDLE_EINTR(sendmsg(signal_fd, &msg, MSG_DONTWAIT | MSG_NOSIGNAL)); 415 HANDLE_EINTR(sendmsg(signal_fd, &msg, MSG_DONTWAIT | MSG_NOSIGNAL));
(...skipping 11 matching lines...) Expand all
427 // no-ops. 427 // no-ops.
428 shutting_down_ = true; 428 shutting_down_ = true;
429 uploader_thread_->Stop(); 429 uploader_thread_->Stop();
430 } 430 }
431 431
432 bool CrashHandlerHostLinux::IsShuttingDown() const { 432 bool CrashHandlerHostLinux::IsShuttingDown() const {
433 return shutting_down_; 433 return shutting_down_;
434 } 434 }
435 435
436 } // namespace breakpad 436 } // namespace breakpad
OLDNEW
« no previous file with comments | « components/crash/browser/crash_dump_manager_android.cc ('k') | components/feedback/feedback_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698