import changes from `dev' branch of rmottola/Arctic-Fox:

- namespace comment (0548ea8a8)
- Bug 1167411 - Add JSAutoStructuredCloneBuffer::abandon, r=jorendorff (6589a8900)
- Bug 911972 - MessagePort and MessageChannel in workers, r=smaug, r=bent (4c533d3ca)
- Bug 1172264 - Track the MDSM's duration as a TimeUnit and eliminate the separate concept of 'end time'. r=jww (49f8f2442)
- Bug 1172264 - Require Manual disconnection for all mirrors. r=jww (845e57496)
- Bug 1172264 - Switch MediaDecoder's mDuration represenation to a double. r=jww (dfde6482d)
- Bug 1172264 - Mirror duration from the MDSM to the MediaDecoder. r=jww (a744fd08f)
- No bug. Refactor GC type annotations, re=terrence (b6bc5723e)
- Bug 1132744 - Update set of GC types, r=sfink (935175adb)
- Bug 967031 - Rename DumpHeapComplete to DumpHeap; r=terrence (337391745)
- Bug 1169097 - Remove CountHeap; r=sfink (074fdb34c)
- Bug 1169086 - Use virtual dispatch to implement callback tracer; r=jonco, r=mccr8 (667218a33)
This commit is contained in:
2021-04-03 23:50:45 +08:00
parent 5bd78e063a
commit 6f81d7d0dc
119 changed files with 4621 additions and 1926 deletions
+6 -9
View File
@@ -276,15 +276,15 @@ BuildClonedMessageData(typename BlobTraits<Flavor>::ConcreteContentManagerType*
SerializedStructuredCloneBuffer& buffer = aClonedData.data();
buffer.data = aData.mData;
buffer.dataLength = aData.mDataLength;
const nsTArray<nsRefPtr<Blob>>& blobs = aData.mClosure.mBlobs;
if (!blobs.IsEmpty()) {
const nsTArray<nsRefPtr<BlobImpl>>& blobImpls = aData.mClosure.mBlobImpls;
if (!blobImpls.IsEmpty()) {
typedef typename BlobTraits<Flavor>::ProtocolType ProtocolType;
InfallibleTArray<ProtocolType*>& blobList = DataBlobs<Flavor>::Blobs(aClonedData);
uint32_t length = blobs.Length();
uint32_t length = blobImpls.Length();
blobList.SetCapacity(length);
for (uint32_t i = 0; i < length; ++i) {
typename BlobTraits<Flavor>::BlobType* protocolActor =
aManager->GetOrCreateActorForBlob(blobs[i]);
aManager->GetOrCreateActorForBlobImpl(blobImpls[i]);
if (!protocolActor) {
return false;
}
@@ -322,7 +322,7 @@ UnpackClonedMessageData(const ClonedMessageData& aData)
cloneData.mDataLength = buffer.dataLength;
if (!blobs.IsEmpty()) {
uint32_t length = blobs.Length();
cloneData.mClosure.mBlobs.SetCapacity(length);
cloneData.mClosure.mBlobImpls.SetCapacity(length);
for (uint32_t i = 0; i < length; ++i) {
auto* blob =
static_cast<typename BlobTraits<Flavor>::BlobType*>(blobs[i]);
@@ -331,10 +331,7 @@ UnpackClonedMessageData(const ClonedMessageData& aData)
nsRefPtr<BlobImpl> blobImpl = blob->GetBlobImpl();
MOZ_ASSERT(blobImpl);
// This object will be duplicated with a correct parent before being
// exposed to JS.
nsRefPtr<Blob> domBlob = Blob::Create(nullptr, blobImpl);
cloneData.mClosure.mBlobs.AppendElement(domBlob);
cloneData.mClosure.mBlobImpls.AppendElement(blobImpl);
}
}
return cloneData;