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

Unified Diff: content/public/common/connection_filter.h

Issue 2268603002: Avoid UAF on ConnectionFilter impls (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 side-by-side diff with in-line comments
Download patch
Index: content/public/common/connection_filter.h
diff --git a/content/public/common/connection_filter.h b/content/public/common/connection_filter.h
index 60679a865ad3a26118b4eb9d833f961115ccb01c..daa864b24b6afd99db5ba98a6c1f142fb95506e5 100644
--- a/content/public/common/connection_filter.h
+++ b/content/public/common/connection_filter.h
@@ -32,6 +32,9 @@ class CONTENT_EXPORT ConnectionFilter {
//
// If a ConnectionFilter is not interested in an incoming connection, it
// should return |false|.
+ //
+ // NOTE: This ConnectionFilter is NOT guaranteed to outlive |registry|, so you
+ // must not attach unsafe references to |this|, e.g., via AddInterface().
virtual bool OnConnect(const shell::Identity& remote_identity,
shell::InterfaceRegistry* registry,
shell::Connector* connector) = 0;
« no previous file with comments | « content/child/child_thread_impl.cc ('k') | content/renderer/mus/render_widget_window_tree_client_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698