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

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

Issue 2790473006: Replace IOAllowed with WaitAllowed in PlatformThread::Join()
Patch Set: allow in IOThreadPreCleanup() Created 3 years, 8 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 | « content/browser/browser_main_loop.cc ('k') | 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_process_sub_thread.h" 5 #include "content/browser/browser_process_sub_thread.h"
6 6
7 #include "base/debug/leak_tracker.h" 7 #include "base/debug/leak_tracker.h"
8 #include "base/threading/thread_restrictions.h" 8 #include "base/threading/thread_restrictions.h"
9 #include "base/trace_event/memory_dump_manager.h" 9 #include "base/trace_event/memory_dump_manager.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void BrowserProcessSubThread::IOThreadPreCleanUp() { 66 void BrowserProcessSubThread::IOThreadPreCleanUp() {
67 // Kill all things that might be holding onto 67 // Kill all things that might be holding onto
68 // net::URLRequest/net::URLRequestContexts. 68 // net::URLRequest/net::URLRequestContexts.
69 69
70 // Destroy all URLRequests started by URLFetchers. 70 // Destroy all URLRequests started by URLFetchers.
71 net::URLFetcher::CancelAll(); 71 net::URLFetcher::CancelAll();
72 72
73 // If any child processes are still running, terminate them and 73 // If any child processes are still running, terminate them and
74 // and delete the BrowserChildProcessHost instances to release whatever 74 // and delete the BrowserChildProcessHost instances to release whatever
75 // IO thread only resources they are referencing. 75 // IO thread only resources they are referencing.
76 BrowserChildProcessHostImpl::TerminateAll(); 76 {
77 base::ThreadRestrictions::ScopedAllowWait allow_wait_to_stop_child_procs;
78 BrowserChildProcessHostImpl::TerminateAll();
79 }
77 80
78 // Unregister GpuMemoryBuffer dump provider before IO thread is shut down. 81 // Unregister GpuMemoryBuffer dump provider before IO thread is shut down.
79 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( 82 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(
80 BrowserGpuMemoryBufferManager::current()); 83 BrowserGpuMemoryBufferManager::current());
81 } 84 }
82 85
83 } // namespace content 86 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698