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

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

Issue 2187243002: Changed raw pointer to WeakPtr to prevent use-after-free on destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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/browser/renderer_host/media/peer_connection_tracker_host.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 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 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 storage_partition_impl_->GetAppCacheService(), GetID())); 932 storage_partition_impl_->GetAppCacheService(), GetID()));
933 AddFilter(new ClipboardMessageFilter(blob_storage_context)); 933 AddFilter(new ClipboardMessageFilter(blob_storage_context));
934 AddFilter(new DOMStorageMessageFilter( 934 AddFilter(new DOMStorageMessageFilter(
935 storage_partition_impl_->GetDOMStorageContext())); 935 storage_partition_impl_->GetDOMStorageContext()));
936 AddFilter(new IndexedDBDispatcherHost( 936 AddFilter(new IndexedDBDispatcherHost(
937 GetID(), storage_partition_impl_->GetURLRequestContext(), 937 GetID(), storage_partition_impl_->GetURLRequestContext(),
938 storage_partition_impl_->GetIndexedDBContext(), 938 storage_partition_impl_->GetIndexedDBContext(),
939 blob_storage_context.get())); 939 blob_storage_context.get()));
940 940
941 #if defined(ENABLE_WEBRTC) 941 #if defined(ENABLE_WEBRTC)
942 peer_connection_tracker_host_ = 942 peer_connection_tracker_host_ = new PeerConnectionTrackerHost(
943 new PeerConnectionTrackerHost(GetID(), &webrtc_eventlog_host_); 943 GetID(), webrtc_eventlog_host_.GetWeakPtr());
944 AddFilter(peer_connection_tracker_host_.get()); 944 AddFilter(peer_connection_tracker_host_.get());
945 AddFilter(new MediaStreamDispatcherHost( 945 AddFilter(new MediaStreamDispatcherHost(
946 GetID(), browser_context->GetResourceContext()->GetMediaDeviceIDSalt(), 946 GetID(), browser_context->GetResourceContext()->GetMediaDeviceIDSalt(),
947 media_stream_manager)); 947 media_stream_manager));
948 AddFilter(new MediaStreamTrackMetricsHost()); 948 AddFilter(new MediaStreamTrackMetricsHost());
949 #endif 949 #endif
950 #if defined(ENABLE_PLUGINS) 950 #if defined(ENABLE_PLUGINS)
951 AddFilter(new PepperRendererConnection(GetID())); 951 AddFilter(new PepperRendererConnection(GetID()));
952 #endif 952 #endif
953 AddFilter(new SpeechRecognitionDispatcherHost( 953 AddFilter(new SpeechRecognitionDispatcherHost(
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after
2763 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 2763 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
2764 2764
2765 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias 2765 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias
2766 // enough information here so that we can determine what the bad message was. 2766 // enough information here so that we can determine what the bad message was.
2767 base::debug::Alias(&error); 2767 base::debug::Alias(&error);
2768 bad_message::ReceivedBadMessage(process.get(), 2768 bad_message::ReceivedBadMessage(process.get(),
2769 bad_message::RPH_MOJO_PROCESS_ERROR); 2769 bad_message::RPH_MOJO_PROCESS_ERROR);
2770 } 2770 }
2771 2771
2772 } // namespace content 2772 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/peer_connection_tracker_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698