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

Unified Diff: content/child/child_thread_impl.cc

Issue 1673803002: Child thread attachment broker should never be destroyed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « content/child/child_thread_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread_impl.cc
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index 5378463a0cdade74433293961bfc4ece5b7aea4b..5ac7bcf38525d87634dde89c3ba437110c5d24e0 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -371,8 +371,9 @@ void ChildThreadImpl::Init(const Options& options) {
// The only reason a global would already exist is if the thread is being run
// in the browser process because of a command line switch.
if (!IPC::AttachmentBroker::GetGlobal()) {
- attachment_broker_.reset(
- IPC::AttachmentBrokerUnprivileged::CreateBroker().release());
+ // Intentionally leak the attachment broker so that it is never destroyed.
Avi (use Gerrit) 2016/02/06 07:03:40 Mention _why_ you leak it, not just that you do.
+ attachment_broker_ =
+ IPC::AttachmentBrokerUnprivileged::CreateBroker().release();
}
#endif
« no previous file with comments | « content/child/child_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698