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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2727733004: [IndexedDB] Closing mojo connections when renderer quits (Closed)
Patch Set: No more raw pointers where we're not guarenteed lifetime Created 3 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 new SynchronousCompositorBrowserFilter(GetID()); 1193 new SynchronousCompositorBrowserFilter(GetID());
1194 AddFilter(synchronous_compositor_filter_.get()); 1194 AddFilter(synchronous_compositor_filter_.get());
1195 #endif 1195 #endif
1196 } 1196 }
1197 1197
1198 void RenderProcessHostImpl::RegisterMojoInterfaces() { 1198 void RenderProcessHostImpl::RegisterMojoInterfaces() {
1199 auto registry = base::MakeUnique<service_manager::InterfaceRegistry>( 1199 auto registry = base::MakeUnique<service_manager::InterfaceRegistry>(
1200 service_manager::mojom::kServiceManager_ConnectorSpec); 1200 service_manager::mojom::kServiceManager_ConnectorSpec);
1201 1201
1202 channel_->AddAssociatedInterfaceForIOThread( 1202 channel_->AddAssociatedInterfaceForIOThread(
1203 base::Bind(&IndexedDBDispatcherHost::AddBinding, indexed_db_factory_)); 1203 base::Bind(&IndexedDBDispatcherHost::AddBinding,
1204 base::Unretained(indexed_db_factory_.get())));
1205 AddObserver(indexed_db_factory_.get());
1204 1206
1205 #if defined(OS_ANDROID) 1207 #if defined(OS_ANDROID)
1206 AddUIThreadInterface(registry.get(), 1208 AddUIThreadInterface(registry.get(),
1207 GetGlobalJavaInterfaces() 1209 GetGlobalJavaInterfaces()
1208 ->CreateInterfaceFactory<device::BatteryMonitor>()); 1210 ->CreateInterfaceFactory<device::BatteryMonitor>());
1209 AddUIThreadInterface( 1211 AddUIThreadInterface(
1210 registry.get(), GetGlobalJavaInterfaces() 1212 registry.get(), GetGlobalJavaInterfaces()
1211 ->CreateInterfaceFactory< 1213 ->CreateInterfaceFactory<
1212 shape_detection::mojom::FaceDetectionProvider>()); 1214 shape_detection::mojom::FaceDetectionProvider>());
1213 AddUIThreadInterface( 1215 AddUIThreadInterface(
(...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after
3071 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3073 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3072 3074
3073 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3075 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3074 // Capture the error message in a crash key value. 3076 // Capture the error message in a crash key value.
3075 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3077 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3076 bad_message::ReceivedBadMessage(render_process_id, 3078 bad_message::ReceivedBadMessage(render_process_id,
3077 bad_message::RPH_MOJO_PROCESS_ERROR); 3079 bad_message::RPH_MOJO_PROCESS_ERROR);
3078 } 3080 }
3079 3081
3080 } // namespace content 3082 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698