Closed Bug 1444852 Opened 7 years ago Closed 7 years ago

nsIFrame::BuildDisplayListForChild: Value stored to 'wrapListASR' during its initialization is never read

Categories

(Core :: Web Painting, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I am doing a presentation at Paris Diderot. I am now explaining how to fix a bug in Firefox!
Comment on attachment 8958065 [details] Bug 1444852 - nsIFrame::BuildDisplayListForChild Remove the init step as the result is unused https://reviewboard.mozilla.org/r/227010/#review232750 ::: layout/generic/nsFrame.cpp:3744 (Diff revision 1) > awayFromCommonPath = true; > } > > nsDisplayList list; > nsDisplayList extraPositionedDescendants; > - const ActiveScrolledRoot* wrapListASR = aBuilder->CurrentActiveScrolledRoot(); > + const ActiveScrolledRoot* wrapListASR; In general having uninitialized pointers around is pretty scary, and `CurrentActiveScrolledRoot` should be just a member offset so should be cheap... Perhaps the giant `if` / `else` block below should be moved to a helper function that returns the ASR along with all the other stuff like `awayFromCommonPath` and such. This is fine for me, but I don't want to introduce a footgun, and I'm not that familiar with display-list building to know how likely this is to become a footgun, so 301 Miko who can probably decide on how this should be fixed / whether this is ok. Maybe landing this is ok for now :)
Attachment #8958065 - Flags: review?(emilio)
Attachment #8958065 - Flags: review?(mikokm)
(In reply to Emilio Cobos Álvarez [:emilio] from comment #2) > Perhaps the giant `if` / `else` block below should be moved to a helper > function that returns the ASR along with all the other stuff like > `awayFromCommonPath` and such. Yeah, this is pretty ugly. Looks like the branch for stacking context/pseudo-stacking context could be combined to reuse some code.
Component: Layout → Layout: Web Painting
Comment on attachment 8958065 [details] Bug 1444852 - nsIFrame::BuildDisplayListForChild Remove the init step as the result is unused https://reviewboard.mozilla.org/r/227010/#review232754 r+ since this was found by static analysis.
Attachment #8958065 - Flags: review?(mikokm) → review+
Comment on attachment 8958065 [details] Bug 1444852 - nsIFrame::BuildDisplayListForChild Remove the init step as the result is unused https://reviewboard.mozilla.org/r/227010/#review232754 Thanks!
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/09af3a6b460a nsIFrame::BuildDisplayListForChild Remove the init step as the result is unused r=miko
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: