Bug 1114989 - Convert Shmem::mSegment to nsRefPtr; r=jrmuizel

--HG--
extra : rebase_source : 9045464e9bdf365993999a5db83e68b21f4f44d6
This commit is contained in:
Ehsan Akhgari 2014-12-23 17:27:11 -05:00
parent cef42d50e5
commit 37d4f87ed3
2 changed files with 3 additions and 3 deletions

View File

@ -624,7 +624,7 @@ Shmem::ShareTo(IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead,
}
if (SharedMemory::TYPE_BASIC == mSegment->Type()) {
SharedMemoryBasic* seg = static_cast<SharedMemoryBasic*>(mSegment);
SharedMemoryBasic* seg = static_cast<SharedMemoryBasic*>(mSegment.get());
SharedMemoryBasic::Handle handle;
if (!seg->ShareToProcess(aProcess, &handle))
return nullptr;

View File

@ -77,7 +77,7 @@ public:
struct IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead {};
Shmem() :
mSegment(nullptr),
mSegment(),
mData(nullptr),
mSize(0),
mId(0)
@ -265,7 +265,7 @@ private:
void AssertInvariants() const;
#endif
SharedMemory* mSegment;
nsRefPtr<SharedMemory> mSegment;
void* mData;
size_t mSize;
id_t mId;