From c4938d1cf0079afeb8fe30b0718fbb607582fbcc Mon Sep 17 00:00:00 2001 From: Ting-Yu Chou Date: Wed, 30 Apr 2014 02:00:00 -0400 Subject: [PATCH] Bug 1002527 - Fix not to initialize remote browser's ContentParent twice. r=bent ContentParent::GetNewOrUsed() initialize the ContentParent always, even it is an initialized one from PreallocatedProcessManager::Take(). Initialize twice makes ContentParent to receive two the same observed event, and creates leak in both observer list and itself. --- dom/ipc/ContentParent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 7e08f148f06..b1064eb6b8b 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -598,9 +598,9 @@ ContentParent::GetNewOrUsed(bool aForBrowserElement) aForBrowserElement, /* isForPreallocated = */ false, PROCESS_PRIORITY_FOREGROUND); + p->Init(); } - p->Init(); sNonAppContentParents->AppendElement(p); return p.forget(); }