Bug 1167396 - Make ProtocolCloneContext::mContentParent a smart pointer. r=bent

This commit is contained in:
Michael Layzell 2015-05-22 10:10:00 -04:00
parent 1e1b34f388
commit 4dc87f0a9b
2 changed files with 17 additions and 9 deletions

View File

@ -26,6 +26,18 @@ using base::ProcessId;
namespace mozilla {
namespace ipc {
ProtocolCloneContext::ProtocolCloneContext()
: mNeckoParent(nullptr)
{}
ProtocolCloneContext::~ProtocolCloneContext()
{}
void ProtocolCloneContext::SetContentParent(ContentParent* aContentParent)
{
mContentParent = aContentParent;
}
static StaticMutex gProtocolMutex;
IToplevelProtocol::IToplevelProtocol(ProtocolId aProtoId)

View File

@ -126,19 +126,15 @@ class ProtocolCloneContext
typedef mozilla::dom::ContentParent ContentParent;
typedef mozilla::net::NeckoParent NeckoParent;
ContentParent* mContentParent;
nsRefPtr<ContentParent> mContentParent;
NeckoParent* mNeckoParent;
public:
ProtocolCloneContext()
: mContentParent(nullptr)
, mNeckoParent(nullptr)
{}
ProtocolCloneContext();
void SetContentParent(ContentParent* aContentParent)
{
mContentParent = aContentParent;
}
~ProtocolCloneContext();
void SetContentParent(ContentParent* aContentParent);
ContentParent* GetContentParent() { return mContentParent; }