зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1626570 - Improve handling of copying arrays in ipc/. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D73679
This commit is contained in:
Родитель
00122bbae3
Коммит
21bb7652c9
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче