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)
Core
Web Painting
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 hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-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/#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)
Updated•7 years ago
|
Attachment #8958065 -
Flags: review?(mikokm)
Comment 3•7 years ago
|
||
(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.
Updated•7 years ago
|
Component: Layout → Layout: Web Painting
Comment 4•7 years ago
|
||
mozreview-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
r+ since this was found by static analysis.
Attachment #8958065 -
Flags: review?(mikokm) → review+
Assignee | ||
Comment 5•7 years ago
|
||
mozreview-review-reply |
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
Comment 7•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Updated•7 years ago
|
status-firefox60:
affected → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•