Bug 1174624 - Add PortIdentifier copy code in order to communicate with same process. r=baku

This commit is contained in:
Mantaroh Yoshinaga 2016-02-15 19:43:00 +01:00
Родитель 7422895e7a
Коммит fa2b32d1a6
2 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -210,7 +210,7 @@ public:
return Move(mTransferredPorts);
}
nsTArray<MessagePortIdentifier>& PortIdentifiers()
nsTArray<MessagePortIdentifier>& PortIdentifiers() const
{
MOZ_ASSERT(mSupportsTransferring);
return mPortIdentifiers;
@ -310,7 +310,7 @@ protected:
// This array contains the identifiers of the MessagePorts. Based on these we
// are able to reconnect the new transferred ports with the other
// MessageChannel ports.
nsTArray<MessagePortIdentifier> mPortIdentifiers;
mutable nsTArray<MessagePortIdentifier> mPortIdentifiers;
#ifdef DEBUG
nsCOMPtr<nsIThread> mCreationThread;

Просмотреть файл

@ -41,6 +41,8 @@ StructuredCloneData::Copy(const StructuredCloneData& aData)
NS_ENSURE_TRUE(mSharedData, false);
}
PortIdentifiers().AppendElements(aData.PortIdentifiers());
MOZ_ASSERT(BlobImpls().IsEmpty());
BlobImpls().AppendElements(aData.BlobImpls());