Bug 1626570 - Improve handling of copying arrays in ipc/. r=nika

Differential Revision: https://phabricator.services.mozilla.com/D73679
This commit is contained in:
Simon Giesecke 2020-05-06 11:51:48 +00:00
Родитель 00122bbae3
Коммит 21bb7652c9
2 изменённых файлов: 2 добавлений и 2 удалений

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

@ -70,7 +70,7 @@ class Histogram {
// Initialize maximum number of buckets in histograms as 16,384.
static const size_t kBucketCount_MAX;
typedef nsTArray<Count> Counts;
typedef CopyableTArray<Count> Counts;
typedef const Sample* Ranges;
// These enums are used to facilitate deserialization of renderer histograms

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

@ -1555,7 +1555,7 @@ ParentImpl::ForceCloseBackgroundActorsRunnable::Run() {
if (!mActorArray->IsEmpty()) {
// Copy the array since calling Close() could mutate the actual array.
nsTArray<ParentImpl*> actorsToClose(*mActorArray);
nsTArray<ParentImpl*> actorsToClose(mActorArray->Clone());
for (uint32_t index = 0; index < actorsToClose.Length(); index++) {
actorsToClose[index]->Close();