зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1797143: Switch from 'new' to 'MakeUnique' to construct an instance that's stored in a UniquePtr, in nsTextFrame.cpp. r=layout-reviewers,emilio
This patch doesn't change behavior. 'observers' is a pointer to nsTArray<UniquePtr<GlyphObserver>>; and UniquePtr prefers[1] MakeUnique over 'new' (due to stronger ownership-related guarantees), so let's switch to MakeUnique for construction here. [1] reference: https://searchfox.org/mozilla-central/rev/88f285c5163f73abd209d4f73cfa476660351982/mfbt/UniquePtr.h#129-131 Depends on D160099 Differential Revision: https://phabricator.services.mozilla.com/D160100
This commit is contained in:
Родитель
880ea24d1f
Коммит
3edbf95781
|
@ -1046,7 +1046,7 @@ static void CreateObserversForAnimatedGlyphs(gfxTextRun* aTextRun) {
|
|||
aTextRun->SetFlagBits(nsTextFrameUtils::Flags::MightHaveGlyphChanges);
|
||||
|
||||
for (auto font : fontsWithAnimatedGlyphs) {
|
||||
observers->AppendElement(new GlyphObserver(font, aTextRun));
|
||||
observers->AppendElement(MakeUnique<GlyphObserver>(font, aTextRun));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче