Closed
Bug 1509972
Opened 7 years ago
Closed 7 years ago
Reduce nsAutoPtr usage in layout/base
Categories
(Core :: Layout, enhancement, P3)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
Details
Attachments
(5 files)
UniquePtr is preferred over nsAutoPtr these days.
Filing this bug on making the switch in several places in layout/base.
Assignee | ||
Comment 1•7 years ago
|
||
This patch also gives nsCSSFrameConstructor.h its own UniquePtr include (since
we have some UniquePtr usage there, but no include). Presumably it's already
getting the include indirectly (via some other header) right now, but it should
really include it directly if it uses the type directly.
(This leaves one nsAutoPtr usage in nsCSSFrameConstructor, for 'mNode'. We can
probably convert that one without too much trouble, but I'm not doing so yet,
in part because we intentionally leak that variable in one spot and I haven't
fully worked out the ownership transfer for that case.)
Assignee | ||
Comment 2•7 years ago
|
||
In each file touched by this commit, there were no mentions of nsAutoPtr
besides the #include.
I verified that the folder layout/base still builds successfully in
non-unified mode after this patch, too. So, none of these files are secretly
using nsAutoPtr and depending on some other .cpp file to provide the header.
Assignee | ||
Comment 3•7 years ago
|
||
Depends on D12993
Assignee | ||
Comment 4•7 years ago
|
||
Depends on D12994
Assignee | ||
Comment 5•7 years ago
|
||
Depends on D12995
Assignee | ||
Comment 6•7 years ago
|
||
(I accidentally posted part 5 on its own before the other parts, so it's listed first here on bugzilla; but it's ordered correctly in the phabricator stack.)
Assignee | ||
Comment 7•7 years ago
|
||
thanks for the reviews! Try run:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=382acefa5665b1f32a1eb26010c289c86ffdda5d
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/79ccc9541536
part 1: Remove unnecessary nsAutoPtr includes from files in layout/base. r=TYLin
https://hg.mozilla.org/integration/autoland/rev/01ef9c6e724f
part 2: Use UniquePtr (not nsAutoPtr) to store nsPresContext members mTextPerf and mMissingFonts. r=TYLin
https://hg.mozilla.org/integration/autoland/rev/025e1c8e3cf8
part 3: Use UniquePtr (not nsAutoPtr) for mNext pointers in StaticPresData's "LangGroupFontPrefs" list. r=TYLin
https://hg.mozilla.org/integration/autoland/rev/ffbdfd28202f
part 4: Use UniquePtr (not nsAutoPtr) to store nsDocumentViewer member mAutoBeforeAndAfterPrint. r=TYLin
https://hg.mozilla.org/integration/autoland/rev/102cab25b07a
part 5: Use UniquePtr (not nsAutoPtr) to store a few local vars in nsCSSFrameConstructor. r=TYLin
Comment 9•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/79ccc9541536
https://hg.mozilla.org/mozilla-central/rev/01ef9c6e724f
https://hg.mozilla.org/mozilla-central/rev/025e1c8e3cf8
https://hg.mozilla.org/mozilla-central/rev/ffbdfd28202f
https://hg.mozilla.org/mozilla-central/rev/102cab25b07a
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in
before you can comment on or make changes to this bug.
Description
•