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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 549303003: Abort if BrowserMainLoops fails to start a browser thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: LOG(FATAL) in BrowserMainLoop Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 case BrowserThread::ID_COUNT: 709 case BrowserThread::ID_COUNT:
710 default: 710 default:
711 NOTREACHED(); 711 NOTREACHED();
712 break; 712 break;
713 } 713 }
714 714
715 BrowserThread::ID id = static_cast<BrowserThread::ID>(thread_id); 715 BrowserThread::ID id = static_cast<BrowserThread::ID>(thread_id);
716 716
717 if (thread_to_start) { 717 if (thread_to_start) {
718 (*thread_to_start).reset(new BrowserProcessSubThread(id)); 718 (*thread_to_start).reset(new BrowserProcessSubThread(id));
719 (*thread_to_start)->StartWithOptions(options); 719 if (!(*thread_to_start)->StartWithOptions(options)) {
720 LOG(FATAL) << "Failed to start the browser thread: id == " << id;
721 }
720 } else { 722 } else {
721 NOTREACHED(); 723 NOTREACHED();
722 } 724 }
723 725
724 TRACE_EVENT_END0("startup", "BrowserMainLoop::CreateThreads:start"); 726 TRACE_EVENT_END0("startup", "BrowserMainLoop::CreateThreads:start");
725 } 727 }
726 created_threads_ = true; 728 created_threads_ = true;
727 return result_code_; 729 return result_code_;
728 } 730 }
729 731
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 &BrowserMainLoop::EndStartupTracing); 1196 &BrowserMainLoop::EndStartupTracing);
1195 } 1197 }
1196 1198
1197 void BrowserMainLoop::EndStartupTracing() { 1199 void BrowserMainLoop::EndStartupTracing() {
1198 is_tracing_startup_ = false; 1200 is_tracing_startup_ = false;
1199 TracingController::GetInstance()->DisableRecording( 1201 TracingController::GetInstance()->DisableRecording(
1200 startup_trace_file_, base::Bind(&OnStoppedStartupTracing)); 1202 startup_trace_file_, base::Bind(&OnStoppedStartupTracing));
1201 } 1203 }
1202 1204
1203 } // namespace content 1205 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698