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

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

Issue 2518413003: NOT FOR COMMIT loop gpu init crash
Patch Set: dec2 Created 4 years 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 | content/browser/browser_main_runner.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) 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 } else { 924 } else {
925 NOTREACHED(); 925 NOTREACHED();
926 } 926 }
927 927
928 TRACE_EVENT_END0("startup", "BrowserMainLoop::CreateThreads:start"); 928 TRACE_EVENT_END0("startup", "BrowserMainLoop::CreateThreads:start");
929 } 929 }
930 created_threads_ = true; 930 created_threads_ = true;
931 return result_code_; 931 return result_code_;
932 } 932 }
933 933
934 static void LogDog() {
935 LOG(ERROR) << "boliu LogDog";
936 base::MessageLoop::current()->PostDelayedTask(
937 FROM_HERE, base::Bind(&LogDog), base::TimeDelta::FromMilliseconds(100));
938 }
939
934 int BrowserMainLoop::PreMainMessageLoopRun() { 940 int BrowserMainLoop::PreMainMessageLoopRun() {
935 if (parts_) { 941 if (parts_) {
936 TRACE_EVENT0("startup", 942 TRACE_EVENT0("startup",
937 "BrowserMainLoop::CreateThreads:PreMainMessageLoopRun"); 943 "BrowserMainLoop::CreateThreads:PreMainMessageLoopRun");
938 944
939 parts_->PreMainMessageLoopRun(); 945 parts_->PreMainMessageLoopRun();
940 } 946 }
941 947
948 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, base::Bind(&LogDog));
949
942 // If the UI thread blocks, the whole UI is unresponsive. 950 // If the UI thread blocks, the whole UI is unresponsive.
943 // Do not allow disk IO from the UI thread. 951 // Do not allow disk IO from the UI thread.
944 base::ThreadRestrictions::SetIOAllowed(false); 952 base::ThreadRestrictions::SetIOAllowed(false);
945 base::ThreadRestrictions::DisallowWaiting(); 953 base::ThreadRestrictions::DisallowWaiting();
946 return result_code_; 954 return result_code_;
947 } 955 }
948 956
949 void BrowserMainLoop::RunMainMessageLoopParts() { 957 void BrowserMainLoop::RunMainMessageLoopParts() {
950 // Don't use the TRACE_EVENT0 macro because the tracing infrastructure doesn't 958 // Don't use the TRACE_EVENT0 macro because the tracing infrastructure doesn't
951 // expect synchronous events around the main loop of a thread. 959 // expect synchronous events around the main loop of a thread.
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = 1545 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner =
1538 audio_thread_->task_runner(); 1546 audio_thread_->task_runner();
1539 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), 1547 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner),
1540 std::move(worker_task_runner), 1548 std::move(worker_task_runner),
1541 MediaInternals::GetInstance()); 1549 MediaInternals::GetInstance());
1542 } 1550 }
1543 CHECK(audio_manager_); 1551 CHECK(audio_manager_);
1544 } 1552 }
1545 1553
1546 } // namespace content 1554 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698