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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Eliminate unnecessary PostTask Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 79eeee2ffcf4a1e6665a8871fc4bfd83e2e16baa..12201b89c20df9d291c99c914626a13914b98e5c 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -87,7 +87,6 @@
#include "content/browser/media/midi_host.h"
#include "content/browser/memory/memory_coordinator_impl.h"
#include "content/browser/memory/memory_message_filter.h"
-#include "content/browser/message_port_message_filter.h"
#include "content/browser/mime_registry_impl.h"
#include "content/browser/notifications/notification_message_filter.h"
#include "content/browser/notifications/platform_notification_context_impl.h"
@@ -1138,19 +1137,13 @@ void RenderProcessHostImpl::CreateMessageFilters() {
channel_->AddFilter(new FontCacheDispatcher());
#endif
- message_port_message_filter_ = new MessagePortMessageFilter(
- base::Bind(&RenderWidgetHelper::GetNextRoutingID,
- base::Unretained(widget_helper_.get())));
- AddFilter(message_port_message_filter_.get());
-
scoped_refptr<CacheStorageDispatcherHost> cache_storage_filter =
new CacheStorageDispatcherHost();
cache_storage_filter->Init(storage_partition_impl_->GetCacheStorageContext());
AddFilter(cache_storage_filter.get());
scoped_refptr<ServiceWorkerDispatcherHost> service_worker_filter =
- new ServiceWorkerDispatcherHost(
- GetID(), message_port_message_filter_.get(), resource_context);
+ new ServiceWorkerDispatcherHost(GetID(), resource_context);
service_worker_filter->Init(
storage_partition_impl_->GetServiceWorkerContext());
AddFilter(service_worker_filter.get());
@@ -1166,7 +1159,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
storage_partition_impl_->GetDatabaseTracker(),
storage_partition_impl_->GetIndexedDBContext(),
storage_partition_impl_->GetServiceWorkerContext()),
- message_port_message_filter_.get()));
+ base::Bind(&RenderWidgetHelper::GetNextRoutingID,
+ base::Unretained(widget_helper_.get()))));
#if BUILDFLAG(ENABLE_WEBRTC)
p2p_socket_dispatcher_host_ = new P2PSocketDispatcherHost(
@@ -2252,9 +2246,6 @@ void RenderProcessHostImpl::Cleanup() {
// OnChannelClosed() to IPC::ChannelProxy::Context on the IO thread.
ResetChannelProxy();
- // The following members should be cleared in ProcessDied() as well!
- message_port_message_filter_ = NULL;
-
// Its important to remove the kSessionStorageHolder after the channel
// has been reset to avoid deleting the underlying namespaces prior
// to processing ipcs referring to them.
@@ -2742,8 +2733,6 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead,
observer.RenderProcessExited(this, status, exit_code);
within_process_died_observer_ = false;
- message_port_message_filter_ = NULL;
-
RemoveUserData(kSessionStorageHolderKey);
IDMap<IPC::Listener*>::iterator iter(&listeners_);

Powered by Google App Engine
This is Rietveld 408576698