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

Side by Side Diff: content/utility/utility_thread_impl.cc

Issue 2274383002: Stop calling Platform::shutdown when a PPAPI/utility thread stop (Closed)
Patch Set: Created 4 years, 4 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/ppapi_plugin/ppapi_thread.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/utility/utility_thread_impl.h" 5 #include "content/utility/utility_thread_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 .UseMojoChannel(true) 50 .UseMojoChannel(true)
51 .Build()) { 51 .Build()) {
52 Init(); 52 Init();
53 } 53 }
54 54
55 UtilityThreadImpl::~UtilityThreadImpl() { 55 UtilityThreadImpl::~UtilityThreadImpl() {
56 } 56 }
57 57
58 void UtilityThreadImpl::Shutdown() { 58 void UtilityThreadImpl::Shutdown() {
59 ChildThreadImpl::Shutdown(); 59 ChildThreadImpl::Shutdown();
60
61 if (blink_platform_impl_)
62 blink::Platform::shutdown();
63 } 60 }
64 61
65 void UtilityThreadImpl::ReleaseProcessIfNeeded() { 62 void UtilityThreadImpl::ReleaseProcessIfNeeded() {
66 if (batch_mode_) 63 if (batch_mode_)
67 return; 64 return;
68 65
69 if (IsInBrowserProcess()) { 66 if (IsInBrowserProcess()) {
70 // Close the channel to cause UtilityProcessHostImpl to be deleted. We need 67 // Close the channel to cause UtilityProcessHostImpl to be deleted. We need
71 // to take a different code path than the multi-process case because that 68 // to take a different code path than the multi-process case because that
72 // depends on the child process going away to close the channel, but that 69 // depends on the child process going away to close the channel, but that
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } 123 }
127 124
128 void UtilityThreadImpl::BindServiceFactoryRequest( 125 void UtilityThreadImpl::BindServiceFactoryRequest(
129 shell::mojom::ServiceFactoryRequest request) { 126 shell::mojom::ServiceFactoryRequest request) {
130 DCHECK(service_factory_); 127 DCHECK(service_factory_);
131 service_factory_bindings_.AddBinding(service_factory_.get(), 128 service_factory_bindings_.AddBinding(service_factory_.get(),
132 std::move(request)); 129 std::move(request));
133 } 130 }
134 131
135 } // namespace content 132 } // namespace content
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698