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

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

Issue 2342523002: Forcibly clear worker ref counts on shutdown. (Closed)
Patch Set: more bundles Created 4 years, 3 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 (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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; 174 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override;
175 #if defined(ENABLE_BROWSER_CDMS) 175 #if defined(ENABLE_BROWSER_CDMS)
176 scoped_refptr<media::MediaKeys> GetCdm(int render_frame_id, 176 scoped_refptr<media::MediaKeys> GetCdm(int render_frame_id,
177 int cdm_id) const override; 177 int cdm_id) const override;
178 #endif 178 #endif
179 bool IsProcessBackgrounded() const override; 179 bool IsProcessBackgrounded() const override;
180 void IncrementServiceWorkerRefCount() override; 180 void IncrementServiceWorkerRefCount() override;
181 void DecrementServiceWorkerRefCount() override; 181 void DecrementServiceWorkerRefCount() override;
182 void IncrementSharedWorkerRefCount() override; 182 void IncrementSharedWorkerRefCount() override;
183 void DecrementSharedWorkerRefCount() override; 183 void DecrementSharedWorkerRefCount() override;
184 void ForceReleaseWorkerRefCounts() override;
185 bool IsWorkerRefCountDisabled() override;
184 void PurgeAndSuspend() override; 186 void PurgeAndSuspend() override;
185 187
186 mojom::RouteProvider* GetRemoteRouteProvider(); 188 mojom::RouteProvider* GetRemoteRouteProvider();
187 189
188 // IPC::Sender via RenderProcessHost. 190 // IPC::Sender via RenderProcessHost.
189 bool Send(IPC::Message* msg) override; 191 bool Send(IPC::Message* msg) override;
190 192
191 // IPC::Listener via RenderProcessHost. 193 // IPC::Listener via RenderProcessHost.
192 bool OnMessageReceived(const IPC::Message& msg) override; 194 bool OnMessageReceived(const IPC::Message& msg) override;
193 void OnChannelConnected(int32_t peer_pid) override; 195 void OnChannelConnected(int32_t peer_pid) override;
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 int connection_filter_id_ = MojoShellConnection::kInvalidConnectionFilterId; 433 int connection_filter_id_ = MojoShellConnection::kInvalidConnectionFilterId;
432 scoped_refptr<ConnectionFilterController> connection_filter_controller_; 434 scoped_refptr<ConnectionFilterController> connection_filter_controller_;
433 shell::mojom::ServicePtr test_service_; 435 shell::mojom::ServicePtr test_service_;
434 #if defined(OS_ANDROID) 436 #if defined(OS_ANDROID)
435 std::unique_ptr<InterfaceRegistryAndroid> interface_registry_android_; 437 std::unique_ptr<InterfaceRegistryAndroid> interface_registry_android_;
436 #endif 438 #endif
437 439
438 size_t service_worker_ref_count_; 440 size_t service_worker_ref_count_;
439 size_t shared_worker_ref_count_; 441 size_t shared_worker_ref_count_;
440 442
443 // Set in ForceReleaseWorkerRefCounts. When true, worker ref counts must no
444 // longer be modified.
445 bool is_worker_ref_count_disabled_;
446
441 // The registered IPC listener objects. When this list is empty, we should 447 // The registered IPC listener objects. When this list is empty, we should
442 // delete ourselves. 448 // delete ourselves.
443 IDMap<IPC::Listener> listeners_; 449 IDMap<IPC::Listener> listeners_;
444 450
445 mojo::AssociatedBinding<mojom::RouteProvider> route_provider_binding_; 451 mojo::AssociatedBinding<mojom::RouteProvider> route_provider_binding_;
446 mojo::AssociatedBindingSet<mojom::AssociatedInterfaceProvider> 452 mojo::AssociatedBindingSet<mojom::AssociatedInterfaceProvider>
447 associated_interface_provider_bindings_; 453 associated_interface_provider_bindings_;
448 454
449 // The count of currently visible widgets. Since the host can be a container 455 // The count of currently visible widgets. Since the host can be a container
450 // for multiple widgets, it uses this count to determine when it should be 456 // for multiple widgets, it uses this count to determine when it should be
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 instance_weak_factory_; 603 instance_weak_factory_;
598 604
599 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; 605 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_;
600 606
601 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); 607 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl);
602 }; 608 };
603 609
604 } // namespace content 610 } // namespace content
605 611
606 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ 612 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698