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

Unified Diff: content/renderer/render_thread_impl.h

Issue 1005893002: Detect and clean up discarded mojo connections to deleted RenderFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK_EQ(1u, erased) Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.h
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 26de62bfa6b56b41a04dbbc91116e43eb5d75f63..6ec87b55449b8d84731acb1340ae2f236fe70c2f 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -606,19 +606,31 @@ class CONTENT_EXPORT RenderThreadImpl
bool is_elastic_overscroll_enabled_;
unsigned use_image_texture_target_;
- struct PendingRenderFrameConnect
- : public base::RefCounted<PendingRenderFrameConnect> {
+ class PendingRenderFrameConnect
+ : public base::RefCounted<PendingRenderFrameConnect>,
+ public mojo::ErrorHandler {
+ public:
PendingRenderFrameConnect(
+ int routing_id,
mojo::InterfaceRequest<mojo::ServiceProvider> services,
mojo::ServiceProviderPtr exposed_services);
- mojo::InterfaceRequest<mojo::ServiceProvider> services;
- mojo::ServiceProviderPtr exposed_services;
+ mojo::InterfaceRequest<mojo::ServiceProvider>& services() {
+ return services_;
+ }
+
+ mojo::ServiceProviderPtr& exposed_services() { return exposed_services_; }
private:
friend class base::RefCounted<PendingRenderFrameConnect>;
- ~PendingRenderFrameConnect();
+ ~PendingRenderFrameConnect() override;
+
+ void OnConnectionError() override;
+
+ int routing_id_;
+ mojo::InterfaceRequest<mojo::ServiceProvider> services_;
+ mojo::ServiceProviderPtr exposed_services_;
};
typedef std::map<int, scoped_refptr<PendingRenderFrameConnect>>
« no previous file with comments | « no previous file | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698